Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

Search on AEM search console

Avatar

Level 2

I have 3 questions for search within AEM search console.

 

1. I am using property predicate to search title alone based on a property(Dita title). This property predicate uses full text . By default this fulltext xpath will be generated as jcr:contains(., fulltextvalue). So i need my property to be placed instead of . eg: jcr:contains(@property, fulltextvalue) How exactly we need to do this?

 

2. When i search based on title or tag, say am getting 100s of results. So i like to add a checkbox like (0-10, 10-20,...50-60,..90-100)for showing less number of results in a single page.(no need of pagination).

 

3. Is there a way to add filter within tagging manager console for filtering out tags by searching?

 

Thanks

 

1 Accepted Solution

Avatar

Correct answer by
Employee

1. You can leverage lucene index of property type for this, like [/jcr:content/<property-name>]="Test". 

select p.* from [cq:Page] As p where isdescendantnode(p, '/content/we-retail')

AND p.[/jcr:content/jcr:title]="test"

 

2. To get checkboxes - you need to set the correct resource type in the JCR path of the touch UI dialog path. See the different fields in this article - we have tabs and each tab has different fields.

 

Adobe Experience Manager Help | Creating an AEM 6.2 HTML Template Language tab movie component

 

To get a checkbox into a dialog - the resource type is Checkbox — Granite UI 1.0 documentation.

 

3. This would need some customization, for the JCR-based implementation, which maps Tags onto JCR Nodes , you can directly use Sling's adaptTo mechanism if you have the resource (e.g. such as /content/cq:tags/default/my/tag 

Tag tag = resource.adaptTo(Tag.class);

While a tag may only be converted *from *a resource (not a node), a tag can be converted *to *both a node and a resource :
Node node = tag.adaptTo(Node.class);
Resource node = tag.adaptTo(Resource.class);

Searching for Tags:

// Searching for the Resource objects that are tagged with the tag object:
Iterator<Resource> it = tag.find();

// Retrieving the usage count of the tag object:
long count = tag.getCount();

// Searching for the Resource objects that are tagged with the tagID String:
 RangeIterator<Resource> it = tagManager.find(tagID);

 

 

 

 

View solution in original post

2 Replies

Avatar

Correct answer by
Employee

1. You can leverage lucene index of property type for this, like [/jcr:content/<property-name>]="Test". 

select p.* from [cq:Page] As p where isdescendantnode(p, '/content/we-retail')

AND p.[/jcr:content/jcr:title]="test"

 

2. To get checkboxes - you need to set the correct resource type in the JCR path of the touch UI dialog path. See the different fields in this article - we have tabs and each tab has different fields.

 

Adobe Experience Manager Help | Creating an AEM 6.2 HTML Template Language tab movie component

 

To get a checkbox into a dialog - the resource type is Checkbox — Granite UI 1.0 documentation.

 

3. This would need some customization, for the JCR-based implementation, which maps Tags onto JCR Nodes , you can directly use Sling's adaptTo mechanism if you have the resource (e.g. such as /content/cq:tags/default/my/tag 

Tag tag = resource.adaptTo(Tag.class);

While a tag may only be converted *from *a resource (not a node), a tag can be converted *to *both a node and a resource :
Node node = tag.adaptTo(Node.class);
Resource node = tag.adaptTo(Resource.class);

Searching for Tags:

// Searching for the Resource objects that are tagged with the tag object:
Iterator<Resource> it = tag.find();

// Retrieving the usage count of the tag object:
long count = tag.getCount();

// Searching for the Resource objects that are tagged with the tagID String:
 RangeIterator<Resource> it = tagManager.find(tagID);

 

 

 

 

Avatar

Level 2
Thanks for your response vanegi. For 2nd and 3rd, I am asking about internal AEM author instance which uses omni search which has predicates for filtering out results. We are able to see p.guessTotal property in overlay.jsp which value is set to 1000 and its added as a parameter to the omnisearch url . Is there anyway to add a predicate containing both p.offset and p.limit value OOTB, so that we can pass those two as a parameters to the omnisearch url for refining the number of results? For the third question, within aem author instance tools->tagging console, can we add a filter for searching tags alone ?