Indexing via the Oak-run Jar indexing-via-the-oak-run-jar

CAUTION
AEM 6.4 has reached the end of extended support and this documentation is no longer updated. For further details, see our technical support periods. Find the supported versions here.

Oak-run supports all indexing use cases on the command line without having to operate from the JMX level. Advantages of the oak-run approach are:

  1. It is a new indexing toolset for AEM 6.4
  2. It decreases time-to-reindex which beneficially impacts re-index times on larger repositories
  3. It is reducing resource consumption during re-indexing in AEM which results in better system performance for other AEM activities
  4. Oak-run provides Out-of-band support: If production conditions doesn’t allow to run re-index on production instances, a cloned environment can be used for re-indexing to avoid critical performance impact.

Below you will find a list of use cases that can be leveraged when performing indexing operations via the oak-run tool.

Index Consistency Checks indexconsistencychecks

NOTE
For more detailed information regarding this scenario, see Use Case 1 - Index Consistency Check.
  • oak-run.jarquickly determines if lucene oak indexes are corrupt.
  • It is safe to run on an in-use AEM instance for consistency check levels 1 and 2.

screen_shot_2017-12-14at135758

Index Statistics indexstatistics

NOTE
For more detailed information regarding this scenario, see Use Case 2 - Index Statistics
  • oak-run.jar dumps all index definitions, important index stats and index contents for offline analysis.

  • Safe to execute on an in-use AEM instance.

image2017-12-19_9-47-40

Re-indexing Approach Decision Tree reindexingapproachdecisiontree

This diagram is a decision tree for when to use the various re-indexing approaches.

oak_-_reindexingwithoak-run

Re-indexing MongoMK / RDMBMK reindexingmongomk

NOTE
For more detailed information regarding this scenario, see Use Case 3 - Reindexing.

Text Pre-extraction for SegmentNodeStore and DocumentNodeStore textpre-extraction

Text pre-extraction (a feature that has existed with AEM 6.3) can be used to reduce the time to re-index. Text pre-extraction can be used in conjunction with all re-indexing approaches.

Depending on the oak-run.jar indexing approach there will be various steps on either side of the Perform Re-index step in the diagram below.

4

NOTE
Orange denotes activities where AEM must be in a maintenance window.

Online re-indexing for MongoMK or RDBMK using oak-run.jar onlinere-indexingformongomk

NOTE
For more detailed information regarding this scenario, see Reindex - DocumentNodeStore.

This is the recommended method for reindexing MongoMK (and RDBMK) AEM installations. No other method should be used.

This process needs to be executed only against a single AEM instance in the cluster.

5

Re-indexing TarMK re-indexingtarmk

NOTE
For more detailed information regarding this scenario, see Reindex - SegmentNodeStore.
  • Cold Standby considerations (TarMK)

    • There are no special consideration for Cold Standby; the Cold Standby instances will sync changes as usual.
  • AEM Publish Farms (AE Publish Farms should always be TarMK)

    • For publish farm it needs to be done for all OR execute the steps on a single publish and then clone the setup for others (taking all the usual precations when cloning AEM instances; sling.id - should link to something here)

Online Re-Indexing for TarMK onlinere-indexingfortarmk

NOTE
For more detailed information regarding this scenario, see Online Reindex - SegmentNodeStore.

This is the method used before the introduction of the new indexing capabilities of oak-run.jar. It can done by setting the reindex=true property on the Oak index.

This approach can be used if the time and performance effects to index are acceptable to the customer. This is often the case for small to medium sized AEM installations.

6

Online Re-Indexing TarMK using oak-run.jar onlinere-indexingtarmkusingoak-run-jar

NOTE
For more detailed information regarding this scenario, see Online Reindex - SegmentNodeStore - The AEM Instance is Running.

Online re-indexing of TarMK using the oak-run.jar is faster than the Online Re-Indexing for TarMK described above. However, it also requires execution during a maintenance window; with the mention that the window will be shorter, and more steps are required to perform the re-indexing.

NOTE
Orange denotes operations where AEM must be performed in a maintenance period.

7

Offline Re-Indexing TarMK using oak-run.jar offlinere-indexingtarmkusingoak-run-jar

NOTE
For more detailed information regarding this scenario, see Online Reindex - SegmentNodeStore - The AEM Instance is Shut Down.

Offline re-indexing of TarMK is the simplest oak-run.jar based re-indexing approach for TarMK as it requires a single oak-run.jar comment. However, it requires the AEM instance to be shutdown.

NOTE
Red denotes operations where AEM must be shut down.

8

Out-of-band Re-Indexing TarMK using oak-run.jar out-of-bandre-indexingtarmkusingoak-run-jar

NOTE
For more detailed information regarding this scenario, see Out of Band Reindex - SegmentNodeStore.

Out-of-band re-indexing minimizes the impact of re-indexing on in-use AEM instances.

NOTE
Red denotes operations where AEM may be shut down.

9

Updating Indexing Definitions updatingindexingdefinitions

NOTE
For more detailed information about this scenario, see Use Case 4 - Updating Index Definitions.

Creating and Updating index definitions on TarMK using ACS Ensure Index creatingandupdatingindexdefinitionsontarmkusingacsensureindex

NOTE
ACS Ensure Index is a community supported project, and is not supported by Adobe Support.

This allows shipping index definition via content package which later results in re-indexing via setting the reindex flag to true. This works for smaller setups where reindexing does not take long time.

For more info, see the ACS Ensure Index documentation for details.

Creating and Updating index definitions on TarMK using oak-run.jar creatingandupdatingindexdefinitionsontarmkusingoak-run-jar

If the time or performance impact of re-indexing using non oak-run.jar methods is too high, the following oak-run.jar based approach can be used to import and re-index Lucene Index definitions in a TarMK based AEM installation.

10

Creating and Updating Index Definitions on MonogMK using oak-run.jar creatingandupdatingindexdefinitionsonmonogmkusingoak-run-jar

If the time or performance impact of re-indexing using non oak-run.jar methods is too high, the following oak-run.jar based approach can be used to import and re-index Lucene Index definitions in MongoMK based AEM installations.

11

recommendation-more-help
6a71a83d-c2e0-4ce7-a6aa-899aa3885b56