Tuning Search index configurations in AEM

Tuning Search index configurations in AEM

Apache lucene index is used by CRX to implement the search functionality in AEM. There are lot of configurations that are provided by CRX using which you can modify the search indexing in AEM.

Using these configurations, the default behavior of the indexing can be modified and the indexing can be customized as per the project requirement.

Use Case:

One of my clients had a requirement of excluding certain legal content from their search page. For achieving that, overriding the default indexing was required.

Here are the steps that can be used to achieve the same:

  • Assuming that the default AEM installation is used having one CRX workspace (“crx.default”), workspace.xml needs to be modified. This file can be found under the following path :


Search Index
  • Indexing_config.xml configuration:

    The configurations in workspace.xml allow you to tune the behavior of the search index, however they don’t let you modify what content is being indexed. To configure this, we need to look at the indexing_config.xml file which allows us to specify indexing rules.
    In CQ versions <= 5.4 the default configuration file indexing_config.xml can be found under crx-quickstart/server/runtime/0/_crx/WEB-INF/classes. In CQ 5.5, the default configuration file is embedded in the repository bundle deployed in the OSGi container.

  • To add a custom indexing configuration:

    Copy the default search index configuration file indexing_config.xml under crx-quickstart/repository/workspaces/crx.default/indexing_config.xml.

    • For CQ5.4 and older versions you can find this file under crx-quickstart/server/runtime/0/_crx/WEB-INF/classes/indexing_config.xml.
    • For CQ5.5, we copied the default indexing_config.xml file below for your convenience.

Now we can set a path for our custom indexing_config.xml in the SearchIndex element of workspace.xml. Open crx-quickstart/workspaces/crx.default/workspace.xml in a text editor and add an indexingConfiguration parameter as shown below:

Search Index