Wednesday, 20 February 2013

Control Replications & Filters in Day CQ

How to?
How to allow replication of content from particular content hierarchy. for e.g. only user generated content (/content/usergenerated) should be replicated through replication agents.

Solution

Usually replication agents doesn't provide content filter functionality to control the replication from agents.However we can achieve the same from below.

To do this simply create a new user, deny this user read access on the root of the content tree you do not wish to get replicated. Then configure Agent User Id of the replication agents you do not want to replicate this content with the user ID you just created. The replication agent will only replicate content it can read with this Agent User Id.

Below picture explains the settings.

Encoding issue with Adobe CQ5.4



Let us think some scenarios where UTF 8 Characters are included in fields. Say we have dialog which contains a textfield, whose value is used later as a request parameter in a servlet. The configuration goes as below.


The XML segment for this simple textfield is shown below (from the dialog.xml) :

                              <name             
                                        jcr:primaryType="cq:Widget" 
                                        allowBlanks="false" 
                                        defaultValue=" " 
                                        fieldLabel="locationdata.dialog.datapanel.name" 
                                        name="./name" 
                                        id="location-name" 
                                        allowBlank="{Boolean}false" 
                                        xtype="textfield"/> 



The dialog also contains a button which, when pressed, is calling a servlet creating a page. The page is created using the 'name' property shown above. Below you can see the JS segment performing the servlet call, when pressing the aforementioned button:

    var locationTagField = CQ.Ext.getCmp('location-tag'); 
      var languageField = CQ.Ext.getCmp('location-available-languages'); 
      var nameField = CQ.Ext.getCmp('location-name'); 
      var jsonURL = CQ.shared.HTTP.getPath() + '/_jcr_content.' + itemtype 
      + '.json?action=createprofilepage&generationlanguage=' 
      + languageField.getValue() + '&location=' 
      + locationTagField.getValue()[0] + '&title=' + nameField.getValue(); 
      var url = CQ.HTTP.externalize(jsonURL, true); 
      var json = CQ.Util.eval(url); 



Below you can see the Java code sgement related to the page creation:

    final String title = slingRequest.getParameter(Constants.PARAM_TITLE); 
    [...] 
    //parentPath and template values are provided as parameters to the relevant method. 
    return resolver.adaptTo(PageManager.class).create(parentPath, null, template, title); 
    [...] 



Issue: Once the page gets created, a special character like ü for Anüssel or Villünkl has encoding issue. E.g it becomes "Asüsersel" instead of "Asüsersel ".

 The above issue is usually a UTF-8. Let us see how to resolve this.

Solution:

It can be easily resolved as below. Set the encoding of the from that you are submit e.g. UTF-8 by the hidden field _charset_. What the default encoding is the different Sling Versions is detailed here. Apache Sling - Request Parameters[http://sling.apache.org/site/request-parameters.html] (see paragraph at the end about Character Encoding)

Wednesday, 13 February 2013

Enterprise Search Tools Available

Below are list of enterprise search tools available in market.




Company Name; Product Name
Adobe ;Adobe Search & Promote
Aduna ;Cluster Map
Ami Software ;AMI Enterprise intelligence
Antarctica Systems ;Visual Net
Aptek ;AptekSearch 1.0
Atomz ;Atomz Search
Autonomy ;IDOL Universal Search
Black Tulip Systems ;Onezeek
BlackBall ;SearchIn Professional
BrightPlanet ;Deep Query ManagerTM
Convera ;Vertical Search Service
Copernic ;Copernic Desktop Agent
Coveo Solutions ;Coveo Platform version 7.0
CrownPeak Technology ;Site Search
DevTech ;SiteSurfer
Dieselpoint ;Dieselpoint Search
Doclinx ;TeraXML Enterprise Search
dtSearch ;dtSearch
Fluid Dynamics Software Corporation ;Fluid Dynamics Search Engine
FreeFind ;FreeFind
Front Logic ;TYPENGO N300 Search
Funnelback ;Funnelback 7
Google ;Google Search Appliance
IBM ;Omnifind Enterprise
Index Data ;Zebra
Intelligent Search ;NameSearch
Intelligenx ;Discovery Engine
Internet WorkShop;Glimpse; WebGlimpse
ISYS Search Software ;ISYS 8 Suite
IT.com ;IT-Discovery
JObjects International ;QuestAgent; naisQuest
Kroll Ontrack ;Engenium Search
KScripts.com ;Ksearch
Lavtech.com ;mnoGoSearch
Lextek ;Onix Full Text Indexing and Retrieval Toolkit
LOGIKA ;FusionBot
Matt's Script Archive ;Simple Search
Microsoft ;SharePoint 2010
Miracle Concepts ;IDKSM Search Engine
Multim ;Windex Search
Namazu Project ;Namazu
Netrics ;Matching, Decision, & Reporting Engines
Network Solutions ;SiteMiner
Northern Light Group ;SinglePoint
omCollab ;MIKE2.0
Open Objects Software, Limited ; Managed Search Service
Technology Group ; OpenFTS
Open Text ;OpenText Discovery Server; OpenText Federated Query Server
Oracle ;Oracle Endeca Guided Search
Oracle ;Secure Enterprise Search
Perlfect Solutions ;Perlfect Search
PHD Computer Consultants ;findinsite
Picosearch ;PicoSearch
Progress Software ;Easy Ask Business Edition
Recommind ;Decisiv Search
RiSearch ;RiSearch; RiSearch Pro; RiSearch PHP; RiSearch SQL; RiFlex
S.L.I. Systems ; Learning Search
SAP ;SAP Netweaver Enterpise Search
SITEFORUM Group ;SiteForum
Smartlogic ;Semaphore Classification Server
Spiderline ;Spiderline
SurfRay ;Ontolica Search Preview
SWISH-E ;SWISH-E
The Nutch Organization ;Nutch ( web-scalable search engine)
Thunderstone Software ;Webinator 5.1, Thunderstone Search Appliance
WizSoft ;WizDoc
Wrensoft ;Zoom Search Engine
Xapian Project ;Xapian Code Library

Search & Promote

This page gives the complete update on Adobe Search And Promote Migrations.
It includes meta data spec, breadcrumb creation, facets navigation, s&p account creation, data view, verify data and further things.
First steps of S&P

Data Collection       
The first step in all S&P implementations is to make sure the XML Feed from the client is perfect without any issues.
       
       
Crawling       
    Setup Meta Definitions in S&P based off of Meta XLS Sheet 

       
    Setup Index Connector   
       
    Setup URL Entry Point   
       
Indexing       
    Create the Staged Index   
    Wait for Index Completion   
        If errors exist (more than single digits) look for reason and fix

Reporting & QA       
The second major step in all S&P implementation projects is to make sure the Data Collection is free of any errors.   
       
       
Reporting       
    Create Data Views with valid fields   

    Search Components       
The third major step in all S&P implementation projects is to create the search components.      
       
       
Define Facets       
   
Breadcrumbs       
   
Page Navigation       
   
Menus       
   
Searches       
   

The following steps ensure that all fields are present in the XML Feed.       
       
       
       
JSON Transport Template       
    Add all Facets   
    Add all Search Results

Presentation Layer   
   
It helps to fetch the output . It could be HTML/XML or JSON format 

Guided XML Template       
    Add all Menus   
    Add Breadcrumbs   
    Add Pagination   
    Add all Facets   
    Add all Search Results   
Check Generated XML Feed       
    Look over XML Feed for all desired fields.   
Simulator       
A major step in S&P is creating a simulation to view search experience on the live site. In order to effectively create a simulator, several presentation files must be created.       
       
       
Create Rule       
    Setup Pre-Search Rule   
        The presentation rule will trigger the right simulator template for viewing.

Set up post search rules
Set up business rules.

Take the S&P account to live.

Update; Adobe Search & Promote is now Adobe Target

Wednesday, 6 February 2013

How to make tag input field accept a single value in CQ5.4



Is there any way to make a Tag input field  (aka a widget with xtype="tags") to accept a single value?



In usual case we can do this manually (e.g. on 'add' event); To achieve this through a property we can follow below methods.


{

"xtype":"tags",

"fieldLabel":"Select one tag",

"name":"./categorytag",

"allowBlank":"false",

"jcr:primaryType":"cq:Widget",



"namespaces":{

"jcr:primaryType":"cq:WidgetCollection",

"categorynm":{"name":"nameofcategory",

"maximum":"1",

"jcr:primaryType":"nt:unstructured"

  }

   }

}

Tuesday, 5 February 2013

How to Refresh dialog after JCR data change in CQ5.4


There has to be a refresh functionality in one of the real development case. A custom dialog in CQ5.4, which having below functionality,

    A static text which shows some information based on data found in CRX repository; Having a button which -when pressed- will call a servlet, generating a bunch of pages.
    After pages have been created successfully, we need the dialog to get "refreshed" automatically in order to show the updated information in CRX repository. Ideally, the dialog should reload from scratch but which is not working in actual.

SOLUTION:


Let us do this by,

<refresh jcr:primaryType="nt:unstructured"   handler="function(){window.location.reload();}"   text="Refresh"/>
           
           
Otherway is, if the call to the servlet not an ajax call then we could register a callback to refresh the custom widget, once the ajax call was success full. How to use ajax calls with jQuery for building components in CQ5 is shown here: