We are using aem 6.1 with oak version 1.2.7.
We see lot of traversal warnings for queries which use sling:resource property. Mostly these queries have paths for assets. Not sure when exactly this query is triggered by AEM.
There is already OOB oak property index available for sling:resource property but still these queries give warnings.
13.04.2016 10:41:31.328 *WARN* [pool-11-thread-5-<main queue>(com/adobe/cq/collection/update/job)] org.apache.jackrabbit.oak.plugins.index.property.strategy.ContentMirrorStoreStrategy Traversed 10000 nodes (15345 index entries) using index slingResource with filter Filter(query=select [jcr:path], [jcr:score], * from [nt:unstructured] as a where [sling:resource] like '/content/dam/cxxc/yyy/xxx/yy/1860x1050-fm-D11C-330-370-410-450.png%' and isdescendantnode(a, '/content/dam') /* xpath: /jcr:root/content/dam//element(*, nt:unstructured)[jcr:like(@sling:resource, '/content/dam/cxxc/yyy/xxx/yy/1860x1050-fm-D11C-330-370-410-450.png%')] */, path=/content/dam//*, property=[sling:resource=[[/content/dam/cxxc/yyy/xxx/yy/1860x1050-fm-D11C-330-370-410-450.png.., ../content/dam/cxxc/yyy/xxx/yy/1860x1050-fm-D11C-330-370-410-450.pnh]]])
These warnings are causing performance issues in author.
Solution for this particular issue is to have lucene property index.Not sure why existing oak property index didnt work.We had to disable it and put in lucene property index as shown below
I am also facing the same issue. Could you please share your findings if your issue is resolved?
Any pointers would be highly appreciated.
If you have the same issue,did you try putting the lucene index as stated above?
could you please post the warning you get so that i can say if this one index will serve your query.
Sorry for very delayed response. Yes this was given by Adobe.
This was the reason given by Adobe Support ,
, lets disable sling:Resource property index at oak:index/slingResource as I can see in your query string its searching using jcr:like over the property sling:Resource. Hence, lets disable from oak:index/slingResource and add these property under oak:index/lucene/nt:base like I have mentioned. To disable oak:index/slingResource change the type property value to disable.
There is caution note, if we see the oak:index/slingResource indexes are needed in future then we have enable it as either of one would be picked based on the cost and oak:index/slingResource would have less cost over the lucene one.
To be honest, right now I am not able to determine the exact reason of this issue. I would recommend doing a offline compaction once on your servers and see if this helps. Though not a foolproof solution to your problem but it might help you.
This is not site search,this happens only in author instance. Our author severs are performing very slow and during our analysis we found these warnings popping up for nearly 2500 times in a day.
I think query is already using existing oak index ,i could see this phrase "using index slingResource " in the warning.
I tried re-indexing this index but still no visible results.
This looks like, the queries are getting triggered when you are searching digital assets in the AEM. Now one of the many causes might be the assets are heavy weight and while searching 10000 nodes should not be a big deal for AEM, still the weight of the assets might be playing a vital role here.
What is the exact nature of your search, is it some search where the users are searching the website or this is some search which the developers and the content authors are doing. It looks like from your reply that you are experiencing the second scenario. In this case as Scott mentioned indexing is the way of optimizing a query so avoid performance issues.
Since this is not likely to affect the user experience I would not worry much about the warning much as long as its not wasting precious development and authoring time.
1.Regarding the query syntax -
Actually our application doesn't trigger this query. I think AEM itself does it when we either search for an asset in cf or in dam,but i am not sure when this query is actually triggered.
I have already put up the warning that comes in error logs. I have just changed asset path to a dummy value.When i tried identifying slow running queries using qla.jar, I got lot of entries like this for different assets in dam.
Query: /jcr:root/content/dam//element(*, nt:unstructured)
Longest: /jcr:root/content/dam//element(*, nt:unstructured)
10,000 nodes traversed; ran 1 times, max 10,000 nodes, 2,234 lines
2.There is already oak property index available for this (given below) and i also see that query is using this index.May be should we use lucene property index or fine tune the existing index?
If you have done OAK Indexing - that is the best way to improve performance when querying in AEM for 6.x.
For those reading this thread and not aware of OAK indexing - see this GEMS session: