---
title: "The xDB search index"
slug: "the-xdb-search-index"
abstract: "An overview of the xDB search index and how to configure what data is included in the index."
---
# The xDB search index

The [xDB index](https://doc.sitecore.com/xp/en/developers/104/platform-administration-and-architecture/xdb-index.html) contains a subset of data from the [xDB Collection database](https://doc.sitecore.com/xp/en/developers/104/platform-administration-and-architecture/xdb-collection-database.html) and is accessed when you use the [xConnect Client API](https://doc.sitecore.com/xp/en/developers/105/sitecore-experience-platform/xconnect-client-api-overview.html "xConnect Client API overview") to search for contacts and interactions. The index is populated by the [xConnect Search Indexer](https://doc.sitecore.com/xp/en/developers/104/platform-administration-and-architecture/xconnect-search-indexer.html), which [regularly polls the xDB Collection database for changes](https://doc.sitecore.com/xp/en/developers/105/sitecore-experience-platform/tracking-changes-to-the-xdb-index.html "Tracking changes to the xDB index").

> [!important]
> The xDB Processing role does not index contact and interaction data. This is a significant change from Sitecore 8.2 and earlier, where indexing was part of the processing pipeline.

<details>
<summary><h2>Facets are indexed automatically</h2></summary>

Contact and interaction facets are automatically indexed by xConnect. This includes [custom facets](https://doc.sitecore.com/xp/en/developers/105/sitecore-experience-platform/create-a-custom-facet.html "Create a custom facet").

Facets or facet propreties decorated with the `[DoNotIndex]` attribute are never indexed. Facets or facet properties marked with `[PIISensitive]` are only indexed if [indexing of PII sensitive data is enabled](https://doc.sitecore.com/xp/en/developers/105/sitecore-experience-platform/enable-indexing-of-pii-sensitive-data-in-the-xdb-index.html "Enable indexing of PII sensitive data in the xDB index"). If a facet is not indexed, it cannot be used in a search query.

</details>

<details>
<summary><h2>Indexing of anonymous contacts is disabled by default</h2></summary>

You can [enable indexing of anonymous contacts](https://doc.sitecore.com/xp/en/developers/105/sitecore-experience-platform/enable-indexing-of-anonymous-contacts-in-the-xdb-index.html "Enable indexing of anonymous contacts in the xDB index") through configuration. The following rules apply when indexing of anonymous contacts is disabled:

- If a contact becomes known, previous interactions are not automatically indexed.
- If a contact becomes anonymous, previous interactions are not automatically removed from the index.
- If a contact becomes known, the contact and its facets are added to the index.
- If a contact becomes anonymous, it is not removed from the index.

</details>

<details>
<summary><h2>Indexing of data marked [PIISensitive] is disabled by default</h2></summary>

You can enable [indexing of PII sensitive data](https://doc.sitecore.com/xp/en/developers/105/sitecore-experience-platform/enable-indexing-of-pii-sensitive-data-in-the-xdb-index.html "Enable indexing of PII sensitive data in the xDB index") through configuration.

</details>

<details>
<summary><h2>Data is indexed but not stored</h2></summary>

Only IDs (such as contact and interaction IDs) and sync tokens are stored as well as indexed. Facets and other contact or interaction properties are indexed but not stored.

</details>