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

# Indexes

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

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

{% /callout %}

{% callout %}
##### In Preview

BYOC Logs is in Preview.
{% /callout %}

By default, a BYOC Logs 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 BYOC Logs indexes, navigate to the [BYOC Logs 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="BYOC Logs indexes configuration page showing three indexes with filters and retention periods" /%}

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

When a log is ingested, BYOC Logs 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 BYOC Logs 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 BYOC Logs, select one or more BYOC Logs indexes in the [Log Explorer](https://docs.datadoghq.com/logs/explorer.md). 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 BYOC Logs](https://docs.datadoghq.com/cloudprem/operate/search_logs.md).

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

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