April 20, 2020
Estimated Post Reading Time ~

Index Consistency Check in AEM6

Oak-run supports indexing use cases on the command line without having to orchestrate the execution of these use cases via AEM's JMX console.

The overarching benefits of using the oak-run.jar index command approach for managing Oak indexes are:
  1. Oak-run index command provideds a new indexing toolset for AEM 6.4.
  2. Oak-run decreases time-to-reindex which reduces re-index times on larger repositories.
  3. Oak-run reduces resource consumption during re-indexing in AEM, resulting in overall better system performance.
  4. Oak-run provides out-of-band re-indexing, supporting situations where production must be available, and cannot tolerate maintenance or downtime otherwise required to reindex.
Sections below would provide sample commands. oak-run index command supports all NodeStore and BlobStore setups. The examples provided below are around setups having FileDataStore and SegmentNodeStore.

Use Case 1 - Index Consistency Check

This is a use case related to index corruption. In some cases it was not possible to determine which of the indexes are corrupt. Therefore, Adobe has provided tooling that:
  1. Performs index consistency checks on all indexes and provides a report on which indexes are valid and which are not valid;
  2. The tooling is usable even if AEM is not accessible;
  3. It is easy to use.
Checking for corrupt indexes can be performed via --index-consistency-check operation:

java -jar oak-run*.jar index --fds-path=/path/to/datastore /path/to/segmentstore/ --index-consistency-check

This will generate a report in indexing-result/index-consistency-check-report.txt. See below for a sample report:

Valid indexes :
- /content/oak:index/enablementResourceName
- /oak:index/cqProjectLucene
- /oak:index/cqTagLucene
- /oak:index/lucene
- /oak:index/ntBaseLucene
- /oak:index/socialLucene
Invalid indexes :
- /oak:index/atDamIndex
- /oak:index/atIndex
- /oak:index/cqPageLucene
- /oak:index/damAssetLucene
- /oak:index/groups
- /oak:index/slingeventJob
- /oak:index/users
- /oak:index/workflowDataLucene
Ignored indexes as these are not of type lucene:
- /oak:index/acPrincipalName
- /oak:index/active

Benefits:
This tooling can now be used by Support and the System Administrator to determine quickly which indexes are corrupt and then reindex them.


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.