How to tune the Lucene index within AEM is a multistep process. Learn what you need to do to optimise your index.
The index is a core component and one that should be quick in answering any queries you fire at it. In many cases, it also grows significantly and sometimes it’s unclear why it is growing or slow. How to tune the Lucene index within AEM is a multi step process, which is briefly described in this blog article. Additionally, we will look at query analysis and traversals, and how to mitigate them to ensure that queries run fast.
When it comes to running an AEM instance in production, the index is always present. Adobe recommends some steps to tune the index further. Some are listed below, but also further extended information and documentation can be found, as the steps may not always be clear. Before trying anything like this on a production instance, make sure you do the testing on an exact copy, as this allows you to gather important information on how long the tasks take and also permits you to calculate for
Details on the functionality and architecture of the index can be found here
Enable Prefetch Index Files
Increase the thread count (5 is the default, suggested is 20)
To check if the index is working properly
- Tail the error log and ensure the indexing is running
- After the above settings are applied, ensure that the index folder is created and being filled
- Check the following
org.apache.jackrabbit.oak: "IndexCopier support statistics" ("IndexCopierStats")
org.apache.jackrabbit.oak: "async" ("IndexStats")
org.apache.jackrabbit.oak: "Lucene Index statistics" ("LuceneIndex")
- The Lucene index statistics will start showing separate indexes once the initial indexing is finished.