Ensure Oak Index: A Quick Review

We did a podcast about the Ensure Oak Index in which we talked about the usefulness of this feature. Here is a written breakdown of that podcast for this specific ACS Adobe Experience Manager Commons feature.

What is it?
From the ACS GitHub page about Ensure Oak Index: “The Oak repository used by Adobe Experience Manager 6, allows from fine tuning of search performance via the definition of Oak Index definitions. The index definition nodes, usually stored under /oak:index, define the index and also store the index data (in a node structure invisible to the AEM tooling).

Ideally the Oak Index definitions used by an application could be stored with in the application’s content package, however, it is possible (and even likely) that upon deployment the content packages index definition may wipe out the actual index data (again, invisible via Adobe Experience Manager tooling) when updating the node, necessitating a reindex, which depending on the repository size and index configuration can be costly (and generally unnecessary).

Ensure Oak Index is tooling that allows Oak Index Definitions (referred to in this document as Ensure Definitions) to be defined in a content package, and then safely translated to real Oak Indexes.”

Said another way, Oak indexing in Adobe Experience Manager 6.0+ allows tuning performance; however, the control of how and when these indexes are created has only been binary to this point—once the /oak:index nodes are created, you can end up immediately performing a very expensive indexing operation. The Ensure Oak Index feature provides finer-grained control of when—and how—these indexes are rebuilt.

How it works
You create nodes of type oak:Unstructured; other than that, the nodes should emulate the structure of the equivalent /oak:index nodes, but adding new boolean properties to provide the finer-grained control. These new properties are: ignore, delete, forceReindex, and recreateOnUpdate.

Audience impact (devs, admins)

  • Admins – Gives better control over when packages can cause potentially disruptive reindexing
  • Devs – Define Ensure indexes as part of their process

Example Application
This is a good tool for the cases when it may take a long time for your indexes to stabilize. While that process is taking place, your production site can run slow, so you can use this tool to let those indexes stabilize in a separate environment and then deploy those stabilized indexes to your production environment with a smaller impact.