oak-run.jar’s index command consolidates a number of features to manage Oak200 indexes in AEM, from gathering index statistics, running index consistency checks, and re/indexing indexes themselves.
Within this article and videos the terms indexing and re-indexing are used interchangeably and considered the same operation.
The version of oak-run.jar used must match the version of Oak used on the AEM instance.
Managing indexes using oak-run.jar leverages the index command with various flags to support different operations.
java -jar oak-run*.jar index ...
oak-run.jardumps all index definitions, important index stats and index contents for offline analysis.
oak-run.jarquickly determines if lucene Oak indexes are corrupt.
Online indexing of TarMK using oak-run.jar is faster than setting
reindex=true on the
oak:queryIndexDefinition node. Despite this performance increase, online indexing using oak-run.jar still requires a maintenance window to perform the indexing.
Online indexing of TarMK using oak-run.jar should not be executed against AEM instances outside of the AEM’s instances maintenance window.
The oak-run.jar index command to perform an online indexing of MongoMK is the same as the TarMK Online indexing with oak-run.jar with the difference that the segment store parameter points to the MongoDB instance that contains the Node store.
java -jar oak-run*.jar index --reindex --index-paths=/oak:index/lucene --read-write --fds-path=/path/to/datastore mongodb://server:port/aem