---
sourceDocument: Xanadu ServiceNow AI Platform Administration
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/platform-administration

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu ServiceNow AI Platform Administration

ft:clusterId :

    - platadm

bundleId :

    - platadm

workflow :

    - Platform


---

# Indexed source retention policies and filter conditions

# Indexed source retention policies and filter conditions {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

AI Search uses settings to automatically purge stale records from the index and optimize search performance. To limit the set of records indexed from source tables, you can configure retention policies and filter
conditions for your indexed sources.

## Indexed source retention policies {#retention-policies-conditions-ais__section_fdt_qqk_2rb}

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.  
When the time since a source record's last update exceeds the limit from the indexed source's retention policy, AI Search marks the corresponding indexed record as stale.  
Note:  
Retention policies are required for indexed sources that index records from the Task \[task\] table or tables that extend it. They are optional for other indexed sources.

## Indexed source filter conditions {#retention-policies-conditions-ais__section_zpd_sqk_2rb}

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.

When a source record no longer satisfies the indexed source's filter conditions, AI Search marks the corresponding indexed record as stale.

## Purging stale records {#retention-policies-conditions-ais__section_yqg_yqk_2rb}

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](https://servicenow-prod.fluidtopics.net/VU9rvWvPcKiPpadzx7Ww8Q "Execute a scheduled job to delete stale records from the AI Search index.").
* **[Purge stale records from the AI Search index](https://servicenow-prod.fluidtopics.net/VU9rvWvPcKiPpadzx7Ww8Q)**   
  Execute a scheduled job to delete stale records from the AI Search index.

