AEM6.5 query throws exception even after oak indexing for OOTB query

Avatar

Avatar
Validate 25
Level 4
srinivas_chann1
Level 4

Likes

21 likes

Total Posts

222 posts

Correct reply

6 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Ignite 5
Ignite 3
View profile

Avatar
Validate 25
Level 4
srinivas_chann1
Level 4

Likes

21 likes

Total Posts

222 posts

Correct reply

6 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Ignite 5
Ignite 3
View profile
srinivas_chann1
Level 4

04-03-2021

Hi,

 

I was able to create oak  index based on the finding from https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem6-5-indexing-on-ootb-qu...

 

The query that is triggered is using

 http://localhost:4502/content/project/us/en.find.json?_charset_=utf-8&f=abc&cs=false&wwo=false&cq_ck=1614580151256

 

 

But when i execute command on the top content path  i.e /content/projectpath

select [jcr:path], [jcr:score], * from [nt:base] as a where isdescendantnode(a, '/content/projectpath/us/en') and lower([jcr:title]) like '%calling all%' union select [jcr:path], [jcr:score], * from [nt:base] as a where isdescendantnode(a, '/content/projectpath/us/en') and lower([jcr:description]) like '%calling all%' union select [jcr:path], [jcr:score], * from [nt:base] as a where isdescendantnode(a, '/content/projectpath/us/en') and lower([jcr:text]) like '%calling all%' union select [jcr:path], [jcr:score], * from [nt:base] as a where isdescendantnode(a, '/content/projectpath/us/en') and lower([text]) like '%calling all%' option(traversal OK)

 

 

Then it throws an exception ,how to solve this issue

 

 

Path for query 

/libs/granite/operations/content/diagnosistools/queryPerformance.html

 

srinivas_chann1_0-1614882172335.png

 

How to resolve this issue.

 

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,314 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,314 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

07-03-2021

This can be avoided only by improving queries but by creating an index. In your case since you are using OOTB find servlet then you don't have the option to change it. you can run your queries for further small subtrees.

Answers (3)

Answers (3)

Avatar

Avatar
Coach
Employee
jbrar
Employee

Likes

389 likes

Total Posts

869 posts

Correct reply

283 solutions
Top badges earned
Coach
Establish
Give Back 50
Give Back 5
Give Back 3
View profile

Avatar
Coach
Employee
jbrar
Employee

Likes

389 likes

Total Posts

869 posts

Correct reply

283 solutions
Top badges earned
Coach
Establish
Give Back 50
Give Back 5
Give Back 3
View profile
jbrar
Employee

05-03-2021

Please do not increase the traversal limit. That limit is there to protect against OOM issues which means increasing the limit will use more memory and in some case, cause outofmemory

Start by creating an index and you can use the oakutils[1] tool to generate the definition. If this is still an issue after an index is deployed, log a support ticket.

 

[1] https://oakutils.appspot.com/generate/index

 

Avatar

Avatar
Ignite 3
Level 5
davidjgonzalezzzz
Level 5

Likes

70 likes

Total Posts

77 posts

Correct reply

31 solutions
Top badges earned
Ignite 3
Affirm 25
Ignite 1
Give Back 5
Give Back 3
View profile

Avatar
Ignite 3
Level 5
davidjgonzalezzzz
Level 5

Likes

70 likes

Total Posts

77 posts

Correct reply

31 solutions
Top badges earned
Ignite 3
Affirm 25
Ignite 1
Give Back 5
Give Back 3
View profile
davidjgonzalezzzz
Level 5

05-03-2021

Unfortunately that is a (very) sub-optimal query, and very hard to tailor a custem index for. A few major issues:

 

* Queries on nt:base, aka "everything"

* Lots of lowercase comparisons (i doubt any indexes are tailored for that property comparison)

* LIKEs with leading wildcards '%someterm....'

 

To be honest, I would log an issue with Support and see if they have recommendations and/or if they can escalate to Engineering to provide a performant OOTB index (or tweak the underlying query to be able to leverage a query).

 

I don't like adjusting the Traversal limit, since as mentioned increasing it can impact AEM performance, and also, remember that this is a global parameter, so other queries youre not thinking/are added in the future might start "enjoying" this higher limit, further impacting AEM performance.

 

 

Avatar

Avatar
Springboard
Level 7
KiranVedantam1992
Level 7

Likes

195 likes

Total Posts

213 posts

Correct reply

60 solutions
Top badges earned
Springboard
Give Back 5
Ignite 1
Affirm 50
Validate 1
View profile

Avatar
Springboard
Level 7
KiranVedantam1992
Level 7

Likes

195 likes

Total Posts

213 posts

Correct reply

60 solutions
Top badges earned
Springboard
Give Back 5
Ignite 1
Affirm 50
Validate 1
View profile
KiranVedantam1992
Level 7

04-03-2021

Try increasing the traversal limit 

 

Note: This will consume high memory

 

http://localhost:4502/system/console/jmx/org.apache.jackrabbit.oak%3Aname%3Dsettings%2Ctype%3DQueryE...

 

Hope this helps.

 

Thanks,

Kiran Vedantam