简体   繁体   中英

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM