Shailesh kumar
Shailesh kumar

Reputation: 11

Extract facets based on tags in Query Builder

I am trying to extract the facets using Query builder in AEM. My query is as below:

1_group.p.or=true
1_group.1_type=cq:Page
1_group.2_type=dam:Asset
2_group.p.or=true
2_group.1_path=/content
2_group.2_path=/content/dam
3_group.p.or=true
3_group.1_tagid=/etc/tags/geometrixx-outdoors/activity/biking
3_group.1_tagid.property=@jcr:content/cq:tags
3_group.2_tagid=/etc/tags/geometrixx-outdoors/activity/biking
3_group.2_tagid.property=@jcr:content/metadata/cq:tags
fulltext=text
p.limit=-1

The Query Builder returns the facets based on the type (cq:page, dam:Asset) for the above query, but I need the facets based on the tags. Is there any way, I can explicitly provide the parameter on which the facets are required. Also, please suggest if we can optimize this query to achieve the same.

Thanks, Shailesh

Upvotes: 0

Views: 1820

Answers (1)

Shailesh kumar
Shailesh kumar

Reputation: 11

This issue is fixed now. The mistake was in the tagid.property predicate. It should not start with @.

1_group.p.or=true
1_group.1_type=cq:Page
1_group.2_type=dam:Asset
2_group.p.or=true
2_group.1_path=/content
2_group.2_path=/content/dam
3_group.p.or=true
3_group.1_tagid=/etc/tags/geometrixx-outdoors/activity/biking
3_group.1_tagid.property=jcr:content/cq:tags
3_group.2_tagid=/etc/tags/geometrixx-outdoors/activity/biking
3_group.2_tagid.property=jcr:content/metadata/cq:tags
fulltext=text
p.limit=-1

Upvotes: 1

Related Questions