Extend default oak index or create custom one?

Avatar

Avatar

Reto_Zigerlig

Avatar

Reto_Zigerlig

Reto_Zigerlig

17-05-2019

Hi @ll

I need to adjust the config of the cqPageLucene index. In detail, I need to extend the path depth, where PageContent gets indexed. To achieve this, it's possible to add a node under /oak:index/cqPageLucene/aggregates/cq:PageContent/include4 with path=*/*/*/*/*.

What is your best practice in this case? Do you extend the out of the box cqPageLucene index or do you create a custom index with the same definition as the cqPageLucene index and the customization?

Many thanks in advance!

Regards,

Reto

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Jörg_Hoh

Employee

Total Posts

3.0K

Likes

952

Correct Reply

1.0K

Avatar

Jörg_Hoh

Employee

Total Posts

3.0K

Likes

952

Correct Reply

1.0K
Jörg_Hoh
Employee

19-05-2019

Please don't create a second index for a nodetype already covered by an ootb index. I haven't tried it myself yet, but I know from trusted sources that it can cause issues. There query engine somethings struggles, might choose the wrong index and then return wrong results.

(Yes, it might cause some work with product updates, but that's typically easy to spot...)

Answers (4)

Answers (4)

Avatar

Avatar

Reto_Zigerlig

Avatar

Reto_Zigerlig

Reto_Zigerlig

12-06-2019

Daycare ticket just created!

Avatar

Avatar

Jörg_Hoh

Employee

Total Posts

3.0K

Likes

952

Correct Reply

1.0K

Avatar

Jörg_Hoh

Employee

Total Posts

3.0K

Likes

952

Correct Reply

1.0K
Jörg_Hoh
Employee

20-05-2019

Can you raise a Daycare ticket for this? Yes, it should be documented.

Avatar

Avatar

Reto_Zigerlig

Avatar

Reto_Zigerlig

Reto_Zigerlig

19-05-2019

That was my intention as well, thanks a lot Joerg for confirmation!

It would be great if such a case would be documented here Best Practices for Queries and Indexing.

Avatar

Avatar

jbrar

Employee

Avatar

jbrar

Employee

jbrar
Employee

17-05-2019

For Customizations, always create new indexes as OOTB indexes might be updated when installing a CFP/SP or during the upgrade and you might lose the custom changes.