AEM 6.4 Query Index Traversal warning | Community
Skip to main content
Level 9
December 29, 2021
Solved

AEM 6.4 Query Index Traversal warning

  • December 29, 2021
  • 2 replies
  • 2743 views

Running the below query throws error [2]. Is it the like operator causing trouble? Do we know how i could avoid traversal warning?

Explain query throws a 150000 traversal limit error.

 

path = /content/dam/en/we-retail
type= nt:unstructured
1_property=metadata/@dc:format
1_property.operation = like
1_property.value = image/%
p.limit =-1

 

[2]

GET /libs/cq/search/content/querydebug.html HTTP/1.1] org.apache.jackrabbit.oak.query.QueryImpl Traversal query (query without index): select [jcr:path], [jcr:score], * from [nt:unstructured] as a where [metadata/dc:format] like 'image/%' and isdescendantnode(a, '/content/dam/we-retail/en') /* xpath: /jcr:root/content/dam/we-retail/en//element(*, nt:unstructured)[(jcr:like(metadata/@dc:format, 'image/%'))] */; consider creating an index

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by lukasz-m

Hi @nitrohazedev, you need to create custom index you can have a look on those pages [1], [2] for more information.

[1] https://experienceleague.adobe.com/docs/experience-manager-65/deploying/practices/best-practices-for-queries-and-indexing.html?lang=en

[2] https://jackrabbit.apache.org/oak/docs/query/lucene.html

You can also consider to change your query in the way it will use some OOTB index, e.g

path=/content/dam/we-retail/en
type=dam:Asset
1_property=jcr:content/metadata/dc:format
1_property.operation=like
1_property.value=image/%
p.limit=-1 

 

2 replies

Level 9
December 30, 2021

Anyone please ? 

lukasz-m
Community Advisor
lukasz-mCommunity AdvisorAccepted solution
Community Advisor
December 30, 2021

Hi @nitrohazedev, you need to create custom index you can have a look on those pages [1], [2] for more information.

[1] https://experienceleague.adobe.com/docs/experience-manager-65/deploying/practices/best-practices-for-queries-and-indexing.html?lang=en

[2] https://jackrabbit.apache.org/oak/docs/query/lucene.html

You can also consider to change your query in the way it will use some OOTB index, e.g

path=/content/dam/we-retail/en
type=dam:Asset
1_property=jcr:content/metadata/dc:format
1_property.operation=like
1_property.value=image/%
p.limit=-1 

 

joerghoh
Adobe Employee
Adobe Employee
December 30, 2021

I would actually recommend to switch to the "type=dam:Asset" statement, as it will use a different, more suitable index.

Level 9
December 30, 2021

Thanks @joerghoh .This along with @lukasz-m 's response helped. Much appreciated. Using OOTB index. I have always wondered, what are the ways to identify what index I have to create? Also, please let me know the steps if there are any for debugging this.