Skip to content

Commit

Permalink
Update roll over index API (#9007)
Browse files Browse the repository at this point in the history
Signed-off-by: kolchfa-aws <[email protected]>
(cherry picked from commit 7b8bdc3)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed Jan 3, 2025
1 parent 65049fd commit 3f40160
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions _api-reference/index-apis/rollover.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
---
layout: default
title: Rollover Index
title: Roll over index
parent: Index APIs
nav_order: 63
canonical_url: https://opensearch.org/docs/latest/api-reference/index-apis/rollover/
---

# Rollover Index
# Roll over index
Introduced 1.0
{: .label .label-purple }

The Rollover Index API creates a new index for a data stream or index alias based on the `wait_for_active_shards` setting.
The roll over index API operation creates a new index for a data stream or index alias based on the `wait_for_active_shards` setting.

## Path and HTTP methods

Expand Down Expand Up @@ -41,22 +41,22 @@ During the index alias rollover process, if you don't specify a custom name and

## Using date math with index rollovers

When using an index alias for time-series data, you can leverage [date math](https://opensearch.org/docs/latest/field-types/supported-field-types/date/) in the index name to track the rollover date. For example, you can create an alias pointing to `my-index-{now/d}-000001`. If you create an alias on June 11, 2029, then the index name would be `my-index-2029.06.11-000001`. For a rollover on June 12, 2029, the new index would be named `my-index-2029.06.12-000002`. See [Roll over an index alias with a write index](#rolling-over-an-index-alias-with-a-write-index) for a practical example.
When using an index alias for time-series data, you can use [date math](https://opensearch.org/docs/latest/field-types/supported-field-types/date/) in the index name to track the rollover date. For example, you can create an alias pointing to `my-index-{now/d}-000001`. If you create an alias on June 11, 2029, then the index name would be `my-index-2029.06.11-000001`. For a rollover on June 12, 2029, the new index would be named `my-index-2029.06.12-000002`. See [Roll over an index alias with a write index](#rolling-over-an-index-alias-with-a-write-index) for a practical example.

## Path parameters

The Rollover Index API supports the parameters listed in the following table.
The following table lists the available path parameters.

Parameter | Type | Description
Parameter | Data type | Description
:--- | :--- | :---
`<rollover-target>` | String | The name of the data stream or index alias to roll over. Required. |
`<target-index>` | String | The name of the index to create. Supports date math. Data streams do not support this parameter. If the name of the alias's current write index does not end with `-` and a number, such as `my-index-000001` or `my-index-2`, then the parameter is required.

## Query parameters

The following table lists the supported query parameters.
The following table lists the available query parameters.

Parameter | Type | Description
Parameter | Data type | Description
:--- | :--- | :---
`cluster_manager_timeout` | Time | The amount of time to wait for a connection to the cluster manager node. Default is `30s`.
`timeout` | Time | The amount of time to wait for a response. Default is `30s`.
Expand Down Expand Up @@ -90,7 +90,7 @@ The `conditions` parameter is an optional object defining criteria for triggerin

The object body supports the following parameters.

Parameter | Type | Description
Parameter | Data type | Description
:--- | :--- | :---
| `max_age` | Time units | Triggers a rollover after the maximum elapsed time since index creation is reached. The elapsed time is always calculated since the index creation time, even if the index origination date is configured to a custom date, such as when using the `index.lifecycle.parse_origination_date` or `index.lifecycle.origination_date` settings. Optional. |
`max_docs` | Integer | Triggers a rollover after the specified maximum number of documents, excluding documents added since the last refresh and documents in replica shards. Optional.
Expand Down

0 comments on commit 3f40160

Please sign in to comment.