From b7863774d11390538f909e4a3bea14d3a12ed787 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 3 Jan 2025 14:08:19 +0000 Subject: [PATCH] Update rollover.md (#8998) Option doesn't exist: ``` Could not rollover datastream ds-test1 status code: 400 response: {"error":{"root_cause":[{"type":"x_content_parse_exception","reason":"[1:34] [conditions] unknown field [max_primary_shard_size]"}],"type":"x_content_parse_exception","reason":"[1:60] [rollover] failed to parse field [conditions]","caused_by":{"type":"x_content_parse_exception","reason":"[1:34] [conditions] unknown field [max_primary_shard_size]"}},"status":400} ``` ``` print(f"Rollover datastream {datastream}") body = { "conditions": { "max_age": "5d", "max_primary_shard_size": "50gb" } } response = self.requests.post(f"{self.base_url}/{datastream}/_rollover", json=body) if response.status_code == 200: print(f"Rollover datastream {datastream} successful") else: print(f"Could not rollover datastream {datastream} status code: {response.status_code} response: {response.text}") ``` max_size does work. Signed-off-by: Sander van de Geijn (cherry picked from commit 9c50165ea17491d4da127d01afa660bdf811ebbf) Signed-off-by: github-actions[bot] --- _api-reference/index-apis/rollover.md | 1 - 1 file changed, 1 deletion(-) diff --git a/_api-reference/index-apis/rollover.md b/_api-reference/index-apis/rollover.md index f7024d55b0..41f4eadebc 100644 --- a/_api-reference/index-apis/rollover.md +++ b/_api-reference/index-apis/rollover.md @@ -95,7 +95,6 @@ Parameter | 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. `max_size` | Byte units | Triggers a rollover when the index reaches a specified size, calculated as the total size of all primary shards. Replicas are not counted. Use the `_cat indices` API and check the `pri.store.size` value to see the current index size. Optional. -`max_primary_shard_size` | Byte units | Triggers a rollover when the largest primary shard in the index reaches a certain size. This is the maximum size of the primary shards in the index. As with `max_size`, replicas are ignored. To see the current shard size, use the `_cat shards` API. The `store` value shows the size of each shard, and `prirep` indicates whether a shard is a primary (`p`) or a replica (`r`). Optional. ### `settings`