Indexed source retention policies and filter conditions
Summarize
Summary of Indexed source retention policies and filter conditions
ServiceNow AI Search allows you to optimize search performance and manage index size by configuring retention policies and filter conditions for indexed sources. These settings control which records from source tables are included in the AI Search index and help automatically purge stale data.
Show less
Indexed source retention policies
Retention policies limit indexing to source records updated within a specified time frame. For example, a two-year retention policy ensures only records updated in the last two years are indexed. Records older than the retention period become stale and are marked for purging. Retention policies are mandatory for sources indexing the Task [task] table or its extensions and optional for other tables.
Indexed source filter conditions
Filter conditions enable you to define specific criteria that records must meet to be indexed. Only records matching all filter conditions are included, reducing the index size and compute resources needed for indexing. For instance, excluding frequently updated open records by status can reduce indexing overhead. However, filter conditions do not reduce the total number of indexing events triggered by table changes, only the records indexed per event.
Purging stale records
AI Search automatically purges stale records daily to maintain optimal performance. Administrators with the admin role can also manually trigger stale record purging via a scheduled job. This process helps keep the AI Search index current and efficient.
To limit the set of records indexed from source tables, you can configure retention policies and filter conditions for your indexed sources. AI Search also uses these settings to automatically purge stale records from the index, optimizing search performance.
Indexed source retention policies
Indexing large source tables, such as the Task [task] table and tables that extend it, can add significant numbers of records to the AI Search index. To limit the set of source table records indexed based on the time since they were last updated, select a retention policy for your indexed source.
AI Search only indexes source records updated within the time period defined for the retention policy. For example, if you select a two-year retention policy, AI Search excludes source records that were last updated more than two years ago.
Indexed source filter conditions
To limit the set of records indexed from a source table, define filter conditions for your indexed source. AI Search only indexes records that match all defined filter conditions.
Adding filter conditions can reduce the number of records indexed from a source table and reduce indexing frequency. As an example, if you exclude frequently updated open records based on their status, AI Search doesn't index data from those records, reducing your index size and the compute resources needed to index changes from the source table.
Purging stale records
AI Search automatically purges stale records from the index daily. Users with the admin role can manually purge stale records. For details on this procedure, see Purge stale records from the AI Search index.