Force OAK index used | Community
Skip to main content
New Participant
November 3, 2015
Solved

Force OAK index used

  • November 3, 2015
  • 6 replies
  • 1595 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by joerghoh

Hi,

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

kind regards,
Jörg

6 replies

Employee
November 4, 2015

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

Lokesh_Shivalingaiah
New Participant
November 4, 2015

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

New Participant
November 4, 2015

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.

kautuk_sahni
Employee
November 4, 2015

Hi

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

 

Thanks and Regards

Kautuk Sahni

Kautuk Sahni
Lokesh_Shivalingaiah
New Participant
November 3, 2015

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

joerghoh
joerghohAccepted solution
Employee
November 3, 2015

Hi,

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

kind regards,
Jörg