Skip to main content

Incremental Indexer is not working

Symptoms

  • Search does

    • return outdated results after update.
    • not return new elements after creation.
    • still return deleted elements.
  • Index is not updated time after performing CRUD action for imported documents.

  • No updated are performed for

    • all index groups.
    • one index group.
    • specific elements.
    • specific updates of the element related to e.g. a single DB table or consumer.

Causes

  • Incremental indexer is not enabled.
  • Database audit
    • is not enabled.
    • is not configured for Alias used by the index.
    • is not configured correctly for one or more affected database tables.
  • Table is missing in the affectedTabels property in the IndexRecordContainer of the affected index group.
  • The affectedIds process in the IndexRecordContainer of the affected index group does
    • not return the correct UID for the changed element.
    • not process the ID of the affected table from the audit event correctly.
  • The query process in the IndexRecordContainer of the affected index group does
    • not handle the UIDs ($local.idvalue) correctly.
    • not return an SQL statement that retrieves the correct data from the database.

How to verify

  • Check if the incremental indexer is enabled in the project preferences.
  • Check if the database audit is enabled in the instance configuration of the system _____CONFIGURATION.
  • Add logging statements to the affectedIdsProcess to monitor the returned values and confirm they match the expected record identifiers.
  • Add logging statements to the queryProcess to monitor the returned SQL statement and confirm they return the UID for the changed index element.
    • The logged statements can then be executed via the Designer to verify the results.
  • Check if the SQL query includes appropriate restrictions using local.idvalue parameters and filters results to the primary key column.
  • Check the individual audit configuration for errors include missing ID columns and incomplete audit sync configurations.
    • Ensure that all database tables include an idColumn definition by reviewing the data alias configuration. Add missing ID columns through the Source tab if they are absent.
    • Verify that all tables contain complete auditSyncConfig entries by examining the alias XML structure.

Solutions

  • Enable the incremental indexer in the project preferences if not set.

  • Configure database audit for the affected tables:

    • Enable database audit in the instance configuration.
    • Add missing idColumn definitions in the data alias configuration.
    • Add or correct auditSyncConfig entries for affected tables. When the number of <entityDB> entries exceeds the number of <auditSyncConfig> entries in the data alias XML, manually add the missing configuration blocks.
    • Use this template for missing audit sync configurations:
    <auditSyncConfig>
    <name>auditSyncConfig</name>
    <auditMode v="0" />
    <syncActive v="false" />
    <syncComplete v="false" />
    <syncDirection v="1" />
    <syncIds></syncIds>
    </auditSyncConfig>

    Insert the template after each <description> node that lacks a corresponding auditSyncConfig entry.

  • Update the affectedTables property in IndexRecordContainer:

    • Add missing tables that should trigger index updates.
    • Remove tables that should not trigger updates.
  • Fix the affectedIds process in IndexRecordContainer:

    • Ensure the process returns a proper UID for the related index element for each affected table.
    • Ensure the UID returned is the actual value of #UID field in query process.
  • Fix the query process in IndexRecordContainer:

    • Verify SQL statement retrieves correct data.
    • Add proper handling of $local.idvalue parameters.
    • Add appropriate filters for primary key columns.
note

It is possible that the actual deployment state of the system differs from what is shown in the project. Perform a force-deploy for all mentioned parts to ensure that both the system and project match.

important

Make sure to save and deploy all changes. Manually clear the server cache after deploying to ensure all changes are applied to the system.

Problem isn't solved?

Other guides for problems with similar symptoms