Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Force OAK index used

Avatar

Level 4

In AEM 6.0 using OAK, is it possible when writing a XPATH query to force what index is being used rather that letting the system determine which it thinks is the fastest evaluated index.

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi,

it is not possible. You can use EXPLAIN to check why Oak uses a certain index.

kind regards,
Jörg

View solution in original post

6 Replies

Avatar

Correct answer by
Employee Advisor

Hi,

it is not possible. You can use EXPLAIN to check why Oak uses a certain index.

kind regards,
Jörg

Avatar

Community Advisor

when it already uses the fastest index, any reason why you would like to override it ??

Avatar

Administrator

Hi

Could you please share the use-case for the community.

 

Thanks and Regards

Kautuk Sahni

Avatar

Level 4

I am already using the explain tool. I have observed that it doesn't always pick the fastest - when lucene index is 510.0, cq:tag index is 310.0, it still prefers to use the slowest - traverse.

Avatar

Community Advisor

It should not be the case. However can you share your query ?

Avatar

Employee

Hi,

can you take a screenshot of the output when you run the query with the "Explain Query" page, similar to [1].

Regards,

Opkar

[1] https://adobe-consulting-services.github.io/acs-aem-tools/images/explain-query/results.png