Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

AEM 6.0 query issue on cq:tags

Avatar

Level 7

Hi All,

 

We started seeing a weird issue about query optimization a few months ago. When we issue a query as:

/jcr:root/content/site//element(*,cq:PageContent)[@sling:resourceType='site/components/page/news-detail' and (@cq:tags = 'department:drama')] order by @date descending

We will see a warning message about traversing too many nodes, 

org.apache.jackrabbit.oak.plugins.index.property.strategy.ContentMirrorStoreStrategy Traversed 60000 nodes (212558 index entries) using index cq:tags with filter Filter

 

There is a node "cqTags" under oak:index, as

 

Screen Shot 2022-06-08 at 2.54.51 PM.png

 

The weird thing is that if we modify the query a bit, /jcr:root/content/site//element(*,cq:PageContent)[@sling:resourceType='site/components/page/news-detail' and (@cq:tags = 'articles:drama')] order by @date descending. Changing the tag value from "department:drama" to "articles:drama" will not issue any warning, given that both tags are valid in the /etc/tags. Also, the issue only takes place in the publisher, not the author. 

 

The "department:drama" tag property is as:

 

Screen Shot 2022-06-08 at 2.54.12 PM.png

 

Any idea where I should troubleshoot this?

 

Thanks!

 

-k

 

 

2 Replies

Avatar

Community Advisor

Hi @kevingtan  - Have you verified if the tag 'articles:drama' is published and/or is available in the publisher?