---
title: Indexes
description: >-
  Learn how to configure multiple indexes with custom filters and retention
  policies for your CloudPrem cluster
breadcrumbs: Docs > CloudPrem > Configure CloudPrem > Indexes
---

# Indexes

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com

{% alert level="danger" %}
This product is not supported for your selected [Datadog site](https://docs.datadoghq.com/getting_started/site). ().
{% /alert %}

{% /callout %}

{% callout %}
##### CloudPrem is in Preview

Join the CloudPrem Preview to access new self-hosted log management features.

[Request Access](https://www.datadoghq.com/product-preview/cloudprem/)
{% /callout %}

By default, a CloudPrem cluster stores all logs in a single index with a single retention policy. With multiple indexes, you can segment logs by defining filter queries and assigning a different retention period to each index. For example, you can retain audit logs for 1 year while keeping debug logs for only 3 days.

To view and manage your CloudPrem indexes, navigate to the [CloudPrem page](https://app.datadoghq.com/cloudprem) in Datadog. Select a cluster and click **View Indexes** to access the index configuration.

{% image
   source="https://docs.dd-static.net/images/cloudprem/indexes/indexes_configuration.010e737ee5633f1bb22aafafe7adae18.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/cloudprem/indexes/indexes_configuration.010e737ee5633f1bb22aafafe7adae18.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="CloudPrem indexes configuration page showing three indexes with filters and retention periods" /%}

## Indexes filters{% #indexes-filters %}

When a log is ingested, CloudPrem evaluates each index's filter from top to bottom and routes the log to the **first matching index**. This means index order matters:

- Place indexes with more specific filters above indexes with broader filters. For example, `source:security env:production` should appear above `source:security`.
- A catch-all index with a `*` filter at the bottom ensures that no logs are dropped.
- A log matches at most one index.

You can reorder indexes at any time by dragging rows or using the **Move to** action.

## Retention per index{% #retention-per-index %}

Each index has its own retention period, which determines how long logs are stored before automatic deletion.

{% alert level="info" %}
If you are upgrading from a previous CloudPrem version, the index retention configured through the Datadog UI takes precedence over the global retention set in the Helm chart values.
{% /alert %}

## Searching across indexes{% #searching-across-indexes %}

To query logs stored in CloudPrem, select one or more CloudPrem indexes in the [Log Explorer](https://docs.datadoghq.com/logs/explorer/). You can select a specific index to narrow your search, or select all indexes in a cluster to search across them. From the index configuration page, use **View in Log Explorer** to open a filtered view for a given index.

For more information, see [Search CloudPrem Logs](https://docs.datadoghq.com/cloudprem/operate/search_logs).

## Further reading{% #further-reading %}

- [Configure Processing Pipelines](https://docs.datadoghq.com/cloudprem/configure/pipelines/)
- [Search Logs](https://docs.datadoghq.com/cloudprem/operate/search_logs/)
