Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

Oak Indexing : Traversal Warning : AEM 6.5.10

Avatar

Level 4

We have below mentioned TRAVERSAL warn in logs, due to OOB query which generates whenever we open the DAM folder. :-

Traversed 1000 nodes with filter Filter(query=select [jcr:path], [jcr:score], * from [nt:base] as a where ischildnode(a, '/content/dam/abcFolder') and [hidden] = 'false' union select [jcr:path], [jcr:score], * from [nt:base] as a where ischildnode(a, '/content/dam/abcFolder') and [hidden] is null /* xpath: /jcr:root/content/dam/abcFolder/*[((@hidden = 'false' or not(@hidden)))] */, path=/content/dam/abcFolder/*, property=[hidden=[false]]); consider creating an index or changing the query

 

Also, I tried to run a simplified version of this query on Explain Query:-

select [jcr:path], [jcr:score] from [nt:base] as a where ischildnode(a, '/content/dam/abcFolder')

Result :-

No indexes were used.

This is a traversal query.

 

Re-indexing wont help because the query is fired on [nt:base], and not [dam:Asset], due to which OOB /oak:index/damAssetLucene, is not getting used.

 

Any suggestions to resolve the issue (except keeping less than 1000 files in each dam folder)

 

Results on Vanilla Instance :-

Query :- select [jcr:path], [jcr:score] from [nt:base] as a where ischildnode(a, '/content/dam')

Explain Query Results :-

No indexes were used.

This is a traversal query.

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @maheshp - We have faced the same issue in our platform when we upgraded to SP 12 from SP10 package. As this is known bug from the AEM SP12 (mentioned in the release notes).

To resolve the issue :

Option#1 - Recommended by Adobe, update the property the below under oak:index/damAssetLucene:

  1. tag -> string -> visualSimilaritySearch (multivalue)
  2. refresh ->boolean ->true & save the changes.

Option#2 - Increase the memory limit in the OSGi configuration (Temporary fix):

Aapche Jackrabbit Query Engine Setting service -> Add one more "0" in Memory read limit field.

 

Rajakp_0-1648791549181.png

 

Regards,

Raja

View solution in original post

9 Replies

Avatar

Employee Advisor

Personally I always use a specific node type instead of a general one like nt:base, it really helps me to improve my query performance.

 

We should avoid  traversal query.

 

Please follow the suggestion here : https://wttech.blog/blog/2020/jcr-query-performance/ 

 

I will share different queries with different use cases it will help you I believe.

Avatar

Level 4

This is an AEM OOB query and nothing coming from our code.

This query is generated OOB, whenever you open DAM folder in AEM

Avatar

Employee Advisor

Got it. One of my friend has observed similar issue with asset move operation in their project and they have raised a day care ticket.

Avatar

Community Advisor

What AEM version and Service pack are you using?

I ask because with SP11 this is a known issue:

https://experienceleague.adobe.com/docs/experience-manager-65/release-notes/service-pack/6.5.11.html...

You need to add the following properties to the index definition node /oak:index/damAssetLucene (no re-indexing is required) :

"tags": [
"visualSimilaritySearch"
]
"refresh": true

Avatar

Correct answer by
Community Advisor

Hi @maheshp - We have faced the same issue in our platform when we upgraded to SP 12 from SP10 package. As this is known bug from the AEM SP12 (mentioned in the release notes).

To resolve the issue :

Option#1 - Recommended by Adobe, update the property the below under oak:index/damAssetLucene:

  1. tag -> string -> visualSimilaritySearch (multivalue)
  2. refresh ->boolean ->true & save the changes.

Option#2 - Increase the memory limit in the OSGi configuration (Temporary fix):

Aapche Jackrabbit Query Engine Setting service -> Add one more "0" in Memory read limit field.

 

Rajakp_0-1648791549181.png

 

Regards,

Raja

Avatar

Level 1

both the solutions didn't solve the issue. Any other possibilities?

 

 

Avatar

Level 1

Hi @Ade-aem0104 ,  the property name should be "tags" not "tag".

 

damAssetLucene index update.png

Avatar

Administrator

I would recommend creating a Support Ticket for this one. 



Kautuk Sahni