Search on AEM search console

Avatar

Avatar

vamsikrishna199

Avatar

vamsikrishna199

vamsikrishna199

01-07-2020

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

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

vanegi

Employee

Avatar

vanegi

Employee

vanegi
Employee

01-07-2020

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);

 

 

 

 

Answers (0)