Skip to main content
Mar 25, 2025 6:22 AM UTC
Solved

Lucene Index in AEM

Hi Team,

I would like to know on aem lucene indexing

As per the aem docs lucene is asyn means what operations does lucene do asynchronously in aem? 

 

Thanks in advance.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
AmitVishwakarma
AmitVishwakarmaAccepted solution
Community Advisor
Mar 25, 2025 6:56 AM UTC

Hi @kummk123 ,

In AEM, Lucene indexing is asynchronous, meaning that indexing operations do not occur immediately upon changes to the repository but instead happen in the background at scheduled intervals.

What operations does Lucene do asynchronously in AEM?

1. Indexing Content Updates:

     - When nodes are added, modified, or deleted, Lucene does not index them instantly.

     - Instead, AEM batches these changes and processes them asynchronously during the next indexing cycle.


2. Re-indexing:

    - If you change an index definition (oak:index node changes), re-indexing is triggered in the background.

3. Commit and Merge Operations:

     - Lucene periodically commits indexed data to the repository and merges segments for better performance.


4. Full-Text Index Updates:

     - If an index includes full-text search ("type": "lucene" in oak:index), AEM processes and updates these full-text indexes asynchronously.

How Often Does Lucene Indexing Run?

     - AEM’s default indexing schedule is controlled by the Async Indexer, which runs approximately every 5 seconds (async index mode).

     - This can be adjusted via OSGi configurations under Apache Jackrabbit Oak Async Index Update.

How to Force Synchronous Indexing?

If you need immediate indexing:

     - Use oak:index properties:

          - "async": "sync" → Forces synchronous indexing.

          - "reindex": true → Triggers a full re-index.

Regards,
Amit

Amit Vishwakarma - Adobe Commerce Champion 2025 | 17x Adobe certified | 6x Adobe SME

4 replies

AmitVishwakarma
Community Advisor
AmitVishwakarmaCommunity AdvisorAccepted solution
Community Advisor
Mar 25, 2025 6:56 AM UTC

Hi @kummk123 ,

In AEM, Lucene indexing is asynchronous, meaning that indexing operations do not occur immediately upon changes to the repository but instead happen in the background at scheduled intervals.

What operations does Lucene do asynchronously in AEM?

1. Indexing Content Updates:

     - When nodes are added, modified, or deleted, Lucene does not index them instantly.

     - Instead, AEM batches these changes and processes them asynchronously during the next indexing cycle.


2. Re-indexing:

    - If you change an index definition (oak:index node changes), re-indexing is triggered in the background.

3. Commit and Merge Operations:

     - Lucene periodically commits indexed data to the repository and merges segments for better performance.


4. Full-Text Index Updates:

     - If an index includes full-text search ("type": "lucene" in oak:index), AEM processes and updates these full-text indexes asynchronously.

How Often Does Lucene Indexing Run?

     - AEM’s default indexing schedule is controlled by the Async Indexer, which runs approximately every 5 seconds (async index mode).

     - This can be adjusted via OSGi configurations under Apache Jackrabbit Oak Async Index Update.

How to Force Synchronous Indexing?

If you need immediate indexing:

     - Use oak:index properties:

          - "async": "sync" → Forces synchronous indexing.

          - "reindex": true → Triggers a full re-index.

Regards,
Amit

Translate
Amit Vishwakarma - Adobe Commerce Champion 2025 | 17x Adobe certified | 6x Adobe SME
Kummk123Author
Mar 25, 2025 8:06 AM UTC

THank YOu.

Translate
arunpatidar
Community Advisor
Community Advisor
Mar 25, 2025 8:12 AM UTC