Attach a Tika configuration to a custom aggregating Lucene index in AEM as a Cloud Service

In Adobe Experience Manager as a Cloud Service, Tika configuration when you create a fully custom aggregating Lucene index. The available documentation doesn’t specify the correct placement or structure for the configuration in diff.json. To fix this issue, define the Tika configuration directly within the custom index definition in diff.json.

Description description

Environment

Adobe Experience Manager as a Cloud Service

Issue/Symptoms

  • It isn’t clear where to attach a Tika configuration when creating a fully custom aggregating Lucene index.
  • The documentation doesn’t specify the correct placement of the Tika configuration in diff.json.
  • The required structure for the Tika configuration isn’t documented for this scenario.

Cause

The placement and structure of the Tika configuration for custom aggregating indexes in diff.json is not documented in standard AEM documentation, leading to confusion about how to implement this requirement.

Resolution resolution

Follow the steps below to resolve the issue:

  1. Open the diff.json file for the index configuration.

  2. Locate the definition for your custom aggregating Lucene index, for example, custom.exampleIndex.

  3. Define the Tika configuration directly inside the index entry at the same level as aggregates and indexRules. Use a structure similar to the following example.

    code language-none
    {
      "custom.exampleIndex": {
        "aggregates": {
          "...": {}
        },
        "tika": {
          "config.xml": {
            "jcr:primaryType": "nt:file",
            "jcr:content": {
              "jcr:primaryType": "nt:resource",
              "jcr:data": ":blobId:",
              "jcr:mimeType": "text/xml"
            }
          }
        }
      }
    }
    
  4. Do not place the Tika configuration under the diff.index/.content.xml wrapper.

  5. Avoid creating an empty config.xml file. Use a valid Tika configuration, which you can copy from an out-of-the-box index or generate using the Oak Index Definition Analyzer.

  6. Test the configuration in a nonproduction environment before you deploy it to production.

Notes

  • Don’t place the Tika configuration under the diff.index/.content.xml wrapper.
  • Don’t create an empty config.xml file. Use a valid Tika configuration copied from an out-of-the-box index or generated with the Oak Index Definition Analyzer.
recommendation-more-help
experience-cloud-kcs-help-kbarticles