We did a code migration from cq5.6 to AEM 6.1. But after migration we are getting bellow warning.
13.05.2016 04:47:08.629 *WARN* [134.113.238.3 [1463129228000] GET /content/myproject/en/groups/MY-GROUP/en.html HTTP/1.1]
org.apache.jackrabbit.oak.spi.query.Cursors$TraversingCursor Traversed 907000 nodes with filter Filter(query=select d.[jcr:path]
as [jcr:path], d.[jcr:score] as [jcr:score], d.* from [nt:base] as a inner join [nt:base] as b on ischildnode(b, a) inner join
[nt:base] as c on ischildnode(c, b) inner join [nt:base] as d on isdescendantnode(d, c) where name(a) = 'social'
and isdescendantnode(a, '/home') and name(b) = 'relationships' and name(c) = 'member' and d.[id] = 'somegroup-users' /* xpath:
/jcr:root/home//social/relationships/member//*[@id='somegroup-users'] */, path=/home//*);
consider creating an index or changing the query
Below mentioned is the code.
SocialGraph socialGraph = resourceResolver.adaptTo(SocialGraph.class);
GraphNode currentUser = socialGraph.getNode("somegroup-users");
for (Relationship r: currentUser.getRelationships("BOTH", "following")) { // We are getting warning for this line
// ..
..//
}
Now this component is not getting loaded.We are getting connection timeout error.
We are not able to understand where the issue is. Do we need to install any hotfix for this? Please advice.
Views
Replies
Total Likes
Hi,
based on the warning it appears that there is no index[0] for the query that is being generated from your code[0]. If this is product code, then raise a daycare ticket or create your own index. Have you installed SP1?
Regards,
Opkar
[0] https://docs.adobe.com/docs/en/aem/6-1/deploy/platform/queries-and-indexing.html
Views
Replies
Total Likes
Hi Opkar,
Thank you for your reply.
When I googled the warning, I got a similar post telling "The warning message "Traversed 333000 nodes using index cq:tags with filter" actually means that there is an existing "property" index, but it itself is too large, and a lucene index should be used instead. The common case of querying something for which there is no index at all will look slightly different - something like "Traversed 1000 nodes without index". So I feel like indexing is not an issue here.
We didn't install SP1.
Views
Replies
Total Likes
Did you index this part of the JCR?
Views
Replies
Total Likes
Yes we have indexed "jcr:path,jcr:score,nt:base" properties. But still we are able to see this warning in logs.
Views
Replies
Total Likes
Hi,
obviously you are using the index, but at the same you use functions which cause a index scan (they need to perform the function on every index entry to check if the condition is met).
Can you post your query?
Jörg
Views
Replies
Total Likes
Hi,
We are not using any query in our code, below mentioned is the code.
SocialGraph socialGraph = resourceResolver.adaptTo(SocialGraph.class);
GraphNode currentUser = socialGraph.getNode("somegroup-users");
for (Relationship r: currentUser.getRelationships("BOTH", "following")) { // We are getting warning for this line
// ..
..//
}
Views
Replies
Total Likes
Hi,
please raise a Daycare ticket, include the complete list of installed bundles and their versions (available via webconsole) and attach a dump of your oak index definitions (hostname/oak:index.-1.json). Obviously there is room for improvement.
(Have you made sure, that the API you're using is not deprecated? In the social area there have been some changes not only in the API, but also in some more general changes in the way it is designed.)
Jörg
Views
Replies
Total Likes
Views
Likes
Replies