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

Force OAK index used

  • November 3, 2015
  • 6 replies
  • 1600 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

joerghoh
Adobe Employee
joerghohAdobe EmployeeAccepted solution
Adobe 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

Lokesh_Shivalingaiah
Level 10
November 3, 2015

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

kautuk_sahni
Community Manager
Community Manager
November 4, 2015

Hi

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

 

Thanks and Regards

Kautuk Sahni

Kautuk Sahni
Level 3
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.

Lokesh_Shivalingaiah
Level 10
November 4, 2015

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

Adobe 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