> ## Documentation Index
> Fetch the complete documentation index at: https://www.algolia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Configure indices to personalize

> Learn how to configure your indices for Advanced Personalization.

export const Index = () => <Tooltip tip="An Algolia index is a searchable dataset that consists of records and configuration settings. These settings define how the records are searched and ranked.">
    index
  </Tooltip>;

export const Facet = () => <Tooltip tip="An attribute in your records that lets users filter or group results (for example, by color, brand, or price)." cta="Faceting" href="/doc/guides/managing-results/refine-results/faceting">
    facet
  </Tooltip>;

export const Events = () => <Tooltip tip="An event is a specific action a user takes in your app or on your website." cta="Events" href="/doc/guides/sending-events">
    events
  </Tooltip>;

export const Affinity = () => <Tooltip tip="Affinity is a preference score that Algolia calculates for each user based on their behavior. It reflects how likely a user is to prefer a specific facet-value pair and helps personalize their search results." cta="Affinity" href="/doc/guides/personalization/advanced-personalization/configure/prerequisites/consider-requirements-limits#affinities">
    affinity
  </Tooltip>;

Configure the indices you want to personalize with Advanced Personalization.

To start personalizing an index,
go to the Advanced Personalization dashboard's [**Configuration**](https://dashboard.algolia.com/advanced-personalization/configuration/indices) page and
select **Personalize an index**.

<Frame caption="Button to personalize an index">
  <img src="https://mintcdn.com/algolia/aN8Lr52w2iijNnTe/images/guides/advanced-personalization/personalize-index-button.png?fit=max&auto=format&n=aN8Lr52w2iijNnTe&q=85&s=af5d0aa74cac7c535e63b5fc22832049" alt="Screenshot of a blue button labeled 'Personalize an index' with a plus sign." class="['m-auto']" width="196" data-path="images/guides/advanced-personalization/personalize-index-button.png" />
</Frame>

<Callout icon="credit-card" color="#c084fc">
  This feature isn't available on every plan.
  Refer to your [pricing plan](https://www.algolia.com/pricing) to see if it's included.
</Callout>

## Select the index to personalize

Select a primary <Index /> or replica.

Advanced Personalization can't personalize an index and its replicas at once.
When you personalize a primary index,
its <Affinity /> and <Events /> mappings apply to its replicas.
The reverse is true too.

<Frame caption="Dashboard interface to select the index to personalize">
  <img src="https://mintcdn.com/algolia/aN8Lr52w2iijNnTe/images/guides/advanced-personalization/configure-indices-select-index.png?fit=max&auto=format&n=aN8Lr52w2iijNnTe&q=85&s=189ace2d3596a22c540619797f628300" alt="Dashboard interface to select the index to personalize" class="['m-auto']" width="1346" height="612" data-path="images/guides/advanced-personalization/configure-indices-select-index.png" />
</Frame>

## Select the attributes for affinities

Advanced Personalization needs to know which <Facet /> attributes to use as affinities.
This lets it personalize the search experience.
In the **Affinities** field, add the facet attributes to use.

For example, say you run an ecommerce website.
Its facet attributes might include category, color, gender, and size.

<Frame caption="Dashboard interface to select the facets for affinities">
  <img src="https://mintcdn.com/algolia/aN8Lr52w2iijNnTe/images/guides/advanced-personalization/configure-indices-select-affinities.png?fit=max&auto=format&n=aN8Lr52w2iijNnTe&q=85&s=d5b113975eb49a714237da467ebf5bd2" alt="Dashboard interface to select the facets for affinities" class="['m-auto']" width="1350" height="760" data-path="images/guides/advanced-personalization/configure-indices-select-affinities.png" />
</Frame>

When selecting attributes as affinities, consider the following:

* **Advanced Personalization relies on facet attributes.**
  In the Algolia dashboard, find the [`attributesForFaceting`](https://dashboard.algolia.com/explorer/configuration/facets/) setting.
  Add the attributes you use as affinities to it.

* **It supports dot notation in facet attribute names.**
  This helps when you select nested facet attributes as affinities.

* **It supports array attributes,** so a single facet attribute can hold several values.

* **It doesn't support the [`filterOnly`](/doc/api-reference/api-parameters/attributesForFaceting#param-filter-only) modifier for facet attributes.**
  Users won't interact with these attributes.
  They're used for [filtering, not faceting](/doc/guides/managing-results/refine-results/faceting#difference-between-filters-and-facets).

## Next step

After setting up the indices, [define your event collection strategy](/doc/guides/personalization/advanced-personalization/configure/setup/events).
This improves the accuracy of user signals.

## Reference

* [Update the configuration with the Advanced Personalization REST API](/doc/rest-api/advanced-personalization/put-config)
