From 74a2a2245b9be826acb71f3ce7c92d48c1790cb1 Mon Sep 17 00:00:00 2001 From: ariamarble Date: Wed, 15 Mar 2023 10:53:35 -0700 Subject: [PATCH 01/11] Add documentation for wait_for_completion API Signed-off-by: ariamarble --- _api-reference/wait_for_completion.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 _api-reference/wait_for_completion.md diff --git a/_api-reference/wait_for_completion.md b/_api-reference/wait_for_completion.md new file mode 100644 index 0000000000..d4ea3ca148 --- /dev/null +++ b/_api-reference/wait_for_completion.md @@ -0,0 +1 @@ +Placeholder file \ No newline at end of file From 2d8a1d3c17ce125012b50e7b08e7333a12e66a55 Mon Sep 17 00:00:00 2001 From: ariamarble Date: Tue, 4 Apr 2023 21:15:20 -0700 Subject: [PATCH 02/11] draft update Signed-off-by: ariamarble --- _api-reference/wait_for_completion.md | 37 ++++++++++++++++++- .../im-dashboards/im-wait-for-completion.md | 15 ++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 _dashboards/im-dashboards/im-wait-for-completion.md diff --git a/_api-reference/wait_for_completion.md b/_api-reference/wait_for_completion.md index d4ea3ca148..827c520868 100644 --- a/_api-reference/wait_for_completion.md +++ b/_api-reference/wait_for_completion.md @@ -1 +1,36 @@ -Placeholder file \ No newline at end of file +--- +layout: default +title: Wait for completion +nav_order: 200 +--- + +# Wait for Completion +Introduced 2.7 +{: .label .label-purple } + + We are enhancing index operations including `split`, `shrink`, `force` `merge`, and `open`, with the `wait_for_completion` parameter. This will transform the operation into a task if set to `false`, the same as a `reindex`, which can help to better trace the status of a long running operation. + +## Path and HTTP methods + + ```bash +POST /_ +``` + +## Request body parameter + +Parameter | Type | Description | +| :--- | :--- | :--- | +| `wait_for_completion` | Boolean | Transforms an operation into a task if set to `false`. Same as a `reindex`, which helps to better trace the status of a long running operation. | +| `task_execution_timeout` | Boolean | Placeholder text | + +#### Example + +```json + +``` + +#### Response + +```json + +``` \ No newline at end of file diff --git a/_dashboards/im-dashboards/im-wait-for-completion.md b/_dashboards/im-dashboards/im-wait-for-completion.md new file mode 100644 index 0000000000..b397324fd8 --- /dev/null +++ b/_dashboards/im-dashboards/im-wait-for-completion.md @@ -0,0 +1,15 @@ +--- +layout: default +title: Wait for completion +nav_order: 50 +--- + +# Wait for Completion in Dashboards +Introduced 2.7 +{: .label .label-purple } + +The index management plugin will provide a notification config for these long running operations, which can provide notification through Chime, Webhook, and Slack by using some capability of the notification plugin. There will be some new CRUD APIs to manage these configs. + +** Screenshots and config below: + +`wait_for_completion` parameter [API reference](link/to/doc). \ No newline at end of file From 1121daf3ed52964e294221cef539ab8acb4abf23 Mon Sep 17 00:00:00 2001 From: ariamarble Date: Mon, 10 Apr 2023 15:37:17 -0700 Subject: [PATCH 03/11] small comment Signed-off-by: ariamarble --- _api-reference/wait_for_completion.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/_api-reference/wait_for_completion.md b/_api-reference/wait_for_completion.md index 827c520868..5054031c8c 100644 --- a/_api-reference/wait_for_completion.md +++ b/_api-reference/wait_for_completion.md @@ -13,7 +13,7 @@ Introduced 2.7 ## Path and HTTP methods ```bash -POST /_ +POST /_tasks ``` ## Request body parameter @@ -33,4 +33,6 @@ Parameter | Type | Description | ```json -``` \ No newline at end of file +``` + +https://opensearch.org/docs/2.6/api-reference/index-apis/open-index/ \ No newline at end of file From c5c2e8e13fe35e3c6bd8ab1bd02090888070b04c Mon Sep 17 00:00:00 2001 From: ariamarble Date: Wed, 19 Apr 2023 08:35:34 +0200 Subject: [PATCH 04/11] page and toc updates Signed-off-by: ariamarble --- _dashboards/im-dashboards/im-wait-for-completion.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/_dashboards/im-dashboards/im-wait-for-completion.md b/_dashboards/im-dashboards/im-wait-for-completion.md index b397324fd8..b4baa6cf8f 100644 --- a/_dashboards/im-dashboards/im-wait-for-completion.md +++ b/_dashboards/im-dashboards/im-wait-for-completion.md @@ -2,6 +2,8 @@ layout: default title: Wait for completion nav_order: 50 +parent: Index management in Dashboards +nav_order: 30 --- # Wait for Completion in Dashboards @@ -12,4 +14,4 @@ The index management plugin will provide a notification config for these long ru ** Screenshots and config below: -`wait_for_completion` parameter [API reference](link/to/doc). \ No newline at end of file +`wait_for_completion` parameter [API reference]({{site.url}}{{site.baseurl}}/api-reference/wait_for_completion/). \ No newline at end of file From ff22af17f401452105c5204aff5406d1e7ef1eca Mon Sep 17 00:00:00 2001 From: ariamarble Date: Wed, 19 Apr 2023 09:02:20 +0200 Subject: [PATCH 05/11] page updates Signed-off-by: ariamarble --- _api-reference/wait_for_completion.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/_api-reference/wait_for_completion.md b/_api-reference/wait_for_completion.md index 5054031c8c..9986162415 100644 --- a/_api-reference/wait_for_completion.md +++ b/_api-reference/wait_for_completion.md @@ -8,7 +8,7 @@ nav_order: 200 Introduced 2.7 {: .label .label-purple } - We are enhancing index operations including `split`, `shrink`, `force` `merge`, and `open`, with the `wait_for_completion` parameter. This will transform the operation into a task if set to `false`, the same as a `reindex`, which can help to better trace the status of a long running operation. + We are enhancing index operations including [split]({{site.url}}{{site.baseurl}}/api-reference/index-apis/split), [shrink]({{site.url}}{{site.baseurl}}/api-reference/index-apis/shrink-index), [force merge]({{site.url}}{{site.baseurl}}/im-plugin/ism/error-prevention/index#force_merge), and [open]({{site.url}}{{site.baseurl}}/api-reference/index-apis/open-index) with the `wait_for_completion` parameter. This parameter will transform the operation into a task when set to `false`, similar to a `reindex`. This can help to better trace the status of a long running operation. ## Path and HTTP methods @@ -20,19 +20,18 @@ POST /_tasks Parameter | Type | Description | | :--- | :--- | :--- | -| `wait_for_completion` | Boolean | Transforms an operation into a task if set to `false`. Same as a `reindex`, which helps to better trace the status of a long running operation. | -| `task_execution_timeout` | Boolean | Placeholder text | +| `wait_for_completion` | Boolean | Transforms an operation into a task if set to `false`. Same as a `reindex`, which helps to better trace the status of a long running operation. Default is `true`. | +| `task_execution_timeout` | Time unit | How long to wait for the response to return. Default is `30s`. | #### Example ```json ``` +{% include copy-curl.html %} #### Response ```json ``` - -https://opensearch.org/docs/2.6/api-reference/index-apis/open-index/ \ No newline at end of file From cb4831b82da59e6d34e5bf42f378c8739882b10e Mon Sep 17 00:00:00 2001 From: ariamarble Date: Wed, 19 Apr 2023 14:38:59 +0200 Subject: [PATCH 06/11] final changes Signed-off-by: ariamarble --- _api-reference/index-apis/clone.md | 2 + _api-reference/index-apis/open-index.md | 2 + _api-reference/index-apis/shrink-index.md | 2 + _api-reference/index-apis/split.md | 2 + _api-reference/wait_for_completion.md | 37 ------------------- .../im-dashboards/im-wait-for-completion.md | 17 --------- _im-plugin/ism/policies.md | 2 + 7 files changed, 10 insertions(+), 54 deletions(-) delete mode 100644 _api-reference/wait_for_completion.md delete mode 100644 _dashboards/im-dashboards/im-wait-for-completion.md diff --git a/_api-reference/index-apis/clone.md b/_api-reference/index-apis/clone.md index 07391ce8f1..8e38caeef8 100644 --- a/_api-reference/index-apis/clone.md +++ b/_api-reference/index-apis/clone.md @@ -55,6 +55,8 @@ Parameter | Type | Description wait_for_active_shards | String | The number of active shards that must be available before OpenSearch processes the request. Default is 1 (only the primary shard). Set to all or a positive integer. Values greater than 1 require replicas. For example, if you specify a value of 3, the index must have two replicas distributed across two additional nodes for the operation to succeed. master_timeout | Time | How long to wait for a connection to the master node. Default is `30s`. timeout | Time | How long to wait for the request to return. Default is `30s`. +wait_for_completion | Boolean | When set to `false`, the request will return a task immediately and the operation will run in background. Default is `true`. +task_execution_timeout | Time | Explicit task execution timeout, only useful when wait_for_completion is false. Default is `1h`. ## Request body diff --git a/_api-reference/index-apis/open-index.md b/_api-reference/index-apis/open-index.md index 9df21b597c..d0cb766da0 100644 --- a/_api-reference/index-apis/open-index.md +++ b/_api-reference/index-apis/open-index.md @@ -37,6 +37,8 @@ ignore_unavailable | Boolean | If true, OpenSearch does not search for missing o wait_for_active_shards | String | Specifies the number of active shards that must be available before OpenSearch processes the request. Default is 1 (only the primary shard). Set to all or a positive integer. Values greater than 1 require replicas. For example, if you specify a value of 3, the index must have two replicas distributed across two additional nodes for the request to succeed. master_timeout | Time | How long to wait for a connection to the master node. Default is `30s`. timeout | Time | How long to wait for a response from the cluster. Default is `30s`. +wait_for_completion | Boolean | When set to `false`, the request will return a task immediately and the operation will run in background. Default is `true`. +task_execution_timeout | Time | Explicit task execution timeout, only useful when wait_for_completion is false. Default is `1h`. ## Response diff --git a/_api-reference/index-apis/shrink-index.md b/_api-reference/index-apis/shrink-index.md index 1df9269949..0569cf8238 100644 --- a/_api-reference/index-apis/shrink-index.md +++ b/_api-reference/index-apis/shrink-index.md @@ -51,6 +51,8 @@ Parameter | Type | description wait_for_active_shards | String | Specifies the number of active shards that must be available before OpenSearch processes the request. Default is 1 (only the primary shard). Set to all or a positive integer. Values greater than 1 require replicas. For example, if you specify a value of 3, the index must have two replicas distributed across two additional nodes for the request to succeed. master_timeout | Time | How long to wait for a connection to the master node. Default is `30s`. timeout | Time | How long to wait for the request to return a response. Default is `30s`. +wait_for_completion | Boolean | When set to `false`, the request will return a task immediately and the operation will run in background. Default is `true`. +task_execution_timeout | Time | Explicit task execution timeout, only useful when wait_for_completion is false. Default is `1h`. ## Request body diff --git a/_api-reference/index-apis/split.md b/_api-reference/index-apis/split.md index 96032d0915..870fe32998 100644 --- a/_api-reference/index-apis/split.md +++ b/_api-reference/index-apis/split.md @@ -55,6 +55,8 @@ Parameter | Type | Description wait_for_active_shards | String | The number of active shards that must be available before OpenSearch processes the request. Default is 1 (only the primary shard). Set to all or a positive integer. Values greater than 1 require replicas. For example, if you specify a value of 3, the index must have two replicas distributed across two additional nodes for the operation to succeed. master_timeout | Time | How long to wait for a connection to the master node. Default is `30s`. timeout | Time | How long to wait for the request to return. Default is `30s`. +wait_for_completion | Boolean | When set to `false`, the request will return a task immediately and the operation will run in background. Default is `true`. +task_execution_timeout | Time | Explicit task execution timeout, only useful when wait_for_completion is false. Default is `1h`. ## Request body diff --git a/_api-reference/wait_for_completion.md b/_api-reference/wait_for_completion.md deleted file mode 100644 index 9986162415..0000000000 --- a/_api-reference/wait_for_completion.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -layout: default -title: Wait for completion -nav_order: 200 ---- - -# Wait for Completion -Introduced 2.7 -{: .label .label-purple } - - We are enhancing index operations including [split]({{site.url}}{{site.baseurl}}/api-reference/index-apis/split), [shrink]({{site.url}}{{site.baseurl}}/api-reference/index-apis/shrink-index), [force merge]({{site.url}}{{site.baseurl}}/im-plugin/ism/error-prevention/index#force_merge), and [open]({{site.url}}{{site.baseurl}}/api-reference/index-apis/open-index) with the `wait_for_completion` parameter. This parameter will transform the operation into a task when set to `false`, similar to a `reindex`. This can help to better trace the status of a long running operation. - -## Path and HTTP methods - - ```bash -POST /_tasks -``` - -## Request body parameter - -Parameter | Type | Description | -| :--- | :--- | :--- | -| `wait_for_completion` | Boolean | Transforms an operation into a task if set to `false`. Same as a `reindex`, which helps to better trace the status of a long running operation. Default is `true`. | -| `task_execution_timeout` | Time unit | How long to wait for the response to return. Default is `30s`. | - -#### Example - -```json - -``` -{% include copy-curl.html %} - -#### Response - -```json - -``` diff --git a/_dashboards/im-dashboards/im-wait-for-completion.md b/_dashboards/im-dashboards/im-wait-for-completion.md deleted file mode 100644 index b4baa6cf8f..0000000000 --- a/_dashboards/im-dashboards/im-wait-for-completion.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -layout: default -title: Wait for completion -nav_order: 50 -parent: Index management in Dashboards -nav_order: 30 ---- - -# Wait for Completion in Dashboards -Introduced 2.7 -{: .label .label-purple } - -The index management plugin will provide a notification config for these long running operations, which can provide notification through Chime, Webhook, and Slack by using some capability of the notification plugin. There will be some new CRUD APIs to manage these configs. - -** Screenshots and config below: - -`wait_for_completion` parameter [API reference]({{site.url}}{{site.baseurl}}/api-reference/wait_for_completion/). \ No newline at end of file diff --git a/_im-plugin/ism/policies.md b/_im-plugin/ism/policies.md index 02a14d8df4..7437dd5a95 100644 --- a/_im-plugin/ism/policies.md +++ b/_im-plugin/ism/policies.md @@ -117,6 +117,8 @@ Reduces the number of Lucene segments by merging the segments of individual shar Parameter | Description | Type | Required :--- | :--- |:--- |:--- | `max_num_segments` | The number of segments to reduce the shard to. | `number` | Yes +wait_for_completion | Boolean | When set to `false`, the request will return a task immediately and the operation will run in background. Default is `true`. | No +task_execution_timeout | Time | Explicit task execution timeout, only useful when wait_for_completion is false. Default is `1h`. | No ```json { From c513f7266b7f367d3ff273962182b1146197ad50 Mon Sep 17 00:00:00 2001 From: ariamarble Date: Thu, 20 Apr 2023 02:52:42 +0200 Subject: [PATCH 07/11] doc review changes Signed-off-by: ariamarble --- _api-reference/index-apis/clone.md | 2 +- _api-reference/index-apis/open-index.md | 2 +- _api-reference/index-apis/shrink-index.md | 2 +- _api-reference/index-apis/split.md | 2 +- _im-plugin/ism/policies.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/_api-reference/index-apis/clone.md b/_api-reference/index-apis/clone.md index 8e38caeef8..b031e8f189 100644 --- a/_api-reference/index-apis/clone.md +++ b/_api-reference/index-apis/clone.md @@ -55,7 +55,7 @@ Parameter | Type | Description wait_for_active_shards | String | The number of active shards that must be available before OpenSearch processes the request. Default is 1 (only the primary shard). Set to all or a positive integer. Values greater than 1 require replicas. For example, if you specify a value of 3, the index must have two replicas distributed across two additional nodes for the operation to succeed. master_timeout | Time | How long to wait for a connection to the master node. Default is `30s`. timeout | Time | How long to wait for the request to return. Default is `30s`. -wait_for_completion | Boolean | When set to `false`, the request will return a task immediately and the operation will run in background. Default is `true`. +wait_for_completion | Boolean | When set to `false`, the request will return immediately instead of waiting for the operation to finish. Default is `true`. task_execution_timeout | Time | Explicit task execution timeout, only useful when wait_for_completion is false. Default is `1h`. ## Request body diff --git a/_api-reference/index-apis/open-index.md b/_api-reference/index-apis/open-index.md index d0cb766da0..fc12458eaa 100644 --- a/_api-reference/index-apis/open-index.md +++ b/_api-reference/index-apis/open-index.md @@ -37,7 +37,7 @@ ignore_unavailable | Boolean | If true, OpenSearch does not search for missing o wait_for_active_shards | String | Specifies the number of active shards that must be available before OpenSearch processes the request. Default is 1 (only the primary shard). Set to all or a positive integer. Values greater than 1 require replicas. For example, if you specify a value of 3, the index must have two replicas distributed across two additional nodes for the request to succeed. master_timeout | Time | How long to wait for a connection to the master node. Default is `30s`. timeout | Time | How long to wait for a response from the cluster. Default is `30s`. -wait_for_completion | Boolean | When set to `false`, the request will return a task immediately and the operation will run in background. Default is `true`. +wait_for_completion | Boolean | When set to `false`, the request will return immediately instead of waiting for the operation to finish. Default is `true`. task_execution_timeout | Time | Explicit task execution timeout, only useful when wait_for_completion is false. Default is `1h`. diff --git a/_api-reference/index-apis/shrink-index.md b/_api-reference/index-apis/shrink-index.md index 0569cf8238..c4ffa9aee5 100644 --- a/_api-reference/index-apis/shrink-index.md +++ b/_api-reference/index-apis/shrink-index.md @@ -51,7 +51,7 @@ Parameter | Type | description wait_for_active_shards | String | Specifies the number of active shards that must be available before OpenSearch processes the request. Default is 1 (only the primary shard). Set to all or a positive integer. Values greater than 1 require replicas. For example, if you specify a value of 3, the index must have two replicas distributed across two additional nodes for the request to succeed. master_timeout | Time | How long to wait for a connection to the master node. Default is `30s`. timeout | Time | How long to wait for the request to return a response. Default is `30s`. -wait_for_completion | Boolean | When set to `false`, the request will return a task immediately and the operation will run in background. Default is `true`. +wait_for_completion | Boolean | When set to `false`, the request will return immediately instead of waiting for the operation to finish. Default is `true`. task_execution_timeout | Time | Explicit task execution timeout, only useful when wait_for_completion is false. Default is `1h`. ## Request body diff --git a/_api-reference/index-apis/split.md b/_api-reference/index-apis/split.md index 870fe32998..82e2368755 100644 --- a/_api-reference/index-apis/split.md +++ b/_api-reference/index-apis/split.md @@ -55,7 +55,7 @@ Parameter | Type | Description wait_for_active_shards | String | The number of active shards that must be available before OpenSearch processes the request. Default is 1 (only the primary shard). Set to all or a positive integer. Values greater than 1 require replicas. For example, if you specify a value of 3, the index must have two replicas distributed across two additional nodes for the operation to succeed. master_timeout | Time | How long to wait for a connection to the master node. Default is `30s`. timeout | Time | How long to wait for the request to return. Default is `30s`. -wait_for_completion | Boolean | When set to `false`, the request will return a task immediately and the operation will run in background. Default is `true`. +wait_for_completion | Boolean | When set to `false`, the request will return immediately instead of waiting for the operation to finish. Default is `true`. task_execution_timeout | Time | Explicit task execution timeout, only useful when wait_for_completion is false. Default is `1h`. ## Request body diff --git a/_im-plugin/ism/policies.md b/_im-plugin/ism/policies.md index 7437dd5a95..ac8ef284c2 100644 --- a/_im-plugin/ism/policies.md +++ b/_im-plugin/ism/policies.md @@ -117,7 +117,7 @@ Reduces the number of Lucene segments by merging the segments of individual shar Parameter | Description | Type | Required :--- | :--- |:--- |:--- | `max_num_segments` | The number of segments to reduce the shard to. | `number` | Yes -wait_for_completion | Boolean | When set to `false`, the request will return a task immediately and the operation will run in background. Default is `true`. | No +wait_for_completion | Boolean | When set to `false`, the request will return immediately instead of waiting for the operation to finish. Default is `true`. | No task_execution_timeout | Time | Explicit task execution timeout, only useful when wait_for_completion is false. Default is `1h`. | No ```json From 52e91ec2faf938c1e6116475c7dedaca238c676d Mon Sep 17 00:00:00 2001 From: ariamarble Date: Thu, 20 Apr 2023 03:28:58 +0200 Subject: [PATCH 08/11] link to task api Signed-off-by: ariamarble --- _api-reference/index-apis/clone.md | 2 +- _api-reference/index-apis/open-index.md | 2 +- _api-reference/index-apis/shrink-index.md | 2 +- _api-reference/index-apis/split.md | 2 +- _im-plugin/ism/policies.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/_api-reference/index-apis/clone.md b/_api-reference/index-apis/clone.md index b031e8f189..bb3094b5fb 100644 --- a/_api-reference/index-apis/clone.md +++ b/_api-reference/index-apis/clone.md @@ -55,7 +55,7 @@ Parameter | Type | Description wait_for_active_shards | String | The number of active shards that must be available before OpenSearch processes the request. Default is 1 (only the primary shard). Set to all or a positive integer. Values greater than 1 require replicas. For example, if you specify a value of 3, the index must have two replicas distributed across two additional nodes for the operation to succeed. master_timeout | Time | How long to wait for a connection to the master node. Default is `30s`. timeout | Time | How long to wait for the request to return. Default is `30s`. -wait_for_completion | Boolean | When set to `false`, the request will return immediately instead of waiting for the operation to finish. Default is `true`. +wait_for_completion | Boolean | When set to `false`, the request will return a [task]({{site.url}}{{site.baseurl}}/api-reference/tasks/) ID and the operation will run in background. Default is `true`. task_execution_timeout | Time | Explicit task execution timeout, only useful when wait_for_completion is false. Default is `1h`. ## Request body diff --git a/_api-reference/index-apis/open-index.md b/_api-reference/index-apis/open-index.md index fc12458eaa..5fd4a663c2 100644 --- a/_api-reference/index-apis/open-index.md +++ b/_api-reference/index-apis/open-index.md @@ -37,7 +37,7 @@ ignore_unavailable | Boolean | If true, OpenSearch does not search for missing o wait_for_active_shards | String | Specifies the number of active shards that must be available before OpenSearch processes the request. Default is 1 (only the primary shard). Set to all or a positive integer. Values greater than 1 require replicas. For example, if you specify a value of 3, the index must have two replicas distributed across two additional nodes for the request to succeed. master_timeout | Time | How long to wait for a connection to the master node. Default is `30s`. timeout | Time | How long to wait for a response from the cluster. Default is `30s`. -wait_for_completion | Boolean | When set to `false`, the request will return immediately instead of waiting for the operation to finish. Default is `true`. +wait_for_completion | Boolean | When set to `false`, the request will return a [task]({{site.url}}{{site.baseurl}}/api-reference/tasks/) ID and the operation will run in background. Default is `true`. task_execution_timeout | Time | Explicit task execution timeout, only useful when wait_for_completion is false. Default is `1h`. diff --git a/_api-reference/index-apis/shrink-index.md b/_api-reference/index-apis/shrink-index.md index c4ffa9aee5..858e1c4c73 100644 --- a/_api-reference/index-apis/shrink-index.md +++ b/_api-reference/index-apis/shrink-index.md @@ -51,7 +51,7 @@ Parameter | Type | description wait_for_active_shards | String | Specifies the number of active shards that must be available before OpenSearch processes the request. Default is 1 (only the primary shard). Set to all or a positive integer. Values greater than 1 require replicas. For example, if you specify a value of 3, the index must have two replicas distributed across two additional nodes for the request to succeed. master_timeout | Time | How long to wait for a connection to the master node. Default is `30s`. timeout | Time | How long to wait for the request to return a response. Default is `30s`. -wait_for_completion | Boolean | When set to `false`, the request will return immediately instead of waiting for the operation to finish. Default is `true`. +wait_for_completion | Boolean | When set to `false`, the request will return a [task]({{site.url}}{{site.baseurl}}/api-reference/tasks/) ID and the operation will run in background. Default is `true`. task_execution_timeout | Time | Explicit task execution timeout, only useful when wait_for_completion is false. Default is `1h`. ## Request body diff --git a/_api-reference/index-apis/split.md b/_api-reference/index-apis/split.md index 82e2368755..6a7a9f8419 100644 --- a/_api-reference/index-apis/split.md +++ b/_api-reference/index-apis/split.md @@ -55,7 +55,7 @@ Parameter | Type | Description wait_for_active_shards | String | The number of active shards that must be available before OpenSearch processes the request. Default is 1 (only the primary shard). Set to all or a positive integer. Values greater than 1 require replicas. For example, if you specify a value of 3, the index must have two replicas distributed across two additional nodes for the operation to succeed. master_timeout | Time | How long to wait for a connection to the master node. Default is `30s`. timeout | Time | How long to wait for the request to return. Default is `30s`. -wait_for_completion | Boolean | When set to `false`, the request will return immediately instead of waiting for the operation to finish. Default is `true`. +wait_for_completion | Boolean | When set to `false`, the request will return a [task]({{site.url}}{{site.baseurl}}/api-reference/tasks/) ID and the operation will run in background. Default is `true`. task_execution_timeout | Time | Explicit task execution timeout, only useful when wait_for_completion is false. Default is `1h`. ## Request body diff --git a/_im-plugin/ism/policies.md b/_im-plugin/ism/policies.md index ac8ef284c2..68dd42073f 100644 --- a/_im-plugin/ism/policies.md +++ b/_im-plugin/ism/policies.md @@ -117,7 +117,7 @@ Reduces the number of Lucene segments by merging the segments of individual shar Parameter | Description | Type | Required :--- | :--- |:--- |:--- | `max_num_segments` | The number of segments to reduce the shard to. | `number` | Yes -wait_for_completion | Boolean | When set to `false`, the request will return immediately instead of waiting for the operation to finish. Default is `true`. | No +wait_for_completion | Boolean | When set to `false`, the request will return a [task]({{site.url}}{{site.baseurl}}/api-reference/tasks/) ID and the operation will run in background. Default is `true`. | No task_execution_timeout | Time | Explicit task execution timeout, only useful when wait_for_completion is false. Default is `1h`. | No ```json From 314e8b0c1a75af4b1330fbf97e3593ccde8f4a6b Mon Sep 17 00:00:00 2001 From: ariamarble Date: Thu, 20 Apr 2023 04:04:56 +0200 Subject: [PATCH 09/11] further doc review updates Signed-off-by: ariamarble --- _api-reference/index-apis/clone.md | 2 +- _api-reference/index-apis/open-index.md | 2 +- _api-reference/index-apis/shrink-index.md | 2 +- _api-reference/index-apis/split.md | 2 +- _im-plugin/ism/policies.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/_api-reference/index-apis/clone.md b/_api-reference/index-apis/clone.md index bb3094b5fb..b8824617bf 100644 --- a/_api-reference/index-apis/clone.md +++ b/_api-reference/index-apis/clone.md @@ -55,7 +55,7 @@ Parameter | Type | Description wait_for_active_shards | String | The number of active shards that must be available before OpenSearch processes the request. Default is 1 (only the primary shard). Set to all or a positive integer. Values greater than 1 require replicas. For example, if you specify a value of 3, the index must have two replicas distributed across two additional nodes for the operation to succeed. master_timeout | Time | How long to wait for a connection to the master node. Default is `30s`. timeout | Time | How long to wait for the request to return. Default is `30s`. -wait_for_completion | Boolean | When set to `false`, the request will return a [task]({{site.url}}{{site.baseurl}}/api-reference/tasks/) ID and the operation will run in background. Default is `true`. +wait_for_completion | Boolean | When set to `false`, the request will return immediately instead of waiting for the operation to finish. To monitor the operation status, use the [Tasks API]({{site.url}}{{site.baseurl}}/api-reference/tasks/) with the task ID that the request returns. Default is `true`. task_execution_timeout | Time | Explicit task execution timeout, only useful when wait_for_completion is false. Default is `1h`. ## Request body diff --git a/_api-reference/index-apis/open-index.md b/_api-reference/index-apis/open-index.md index 5fd4a663c2..e24674e00f 100644 --- a/_api-reference/index-apis/open-index.md +++ b/_api-reference/index-apis/open-index.md @@ -37,7 +37,7 @@ ignore_unavailable | Boolean | If true, OpenSearch does not search for missing o wait_for_active_shards | String | Specifies the number of active shards that must be available before OpenSearch processes the request. Default is 1 (only the primary shard). Set to all or a positive integer. Values greater than 1 require replicas. For example, if you specify a value of 3, the index must have two replicas distributed across two additional nodes for the request to succeed. master_timeout | Time | How long to wait for a connection to the master node. Default is `30s`. timeout | Time | How long to wait for a response from the cluster. Default is `30s`. -wait_for_completion | Boolean | When set to `false`, the request will return a [task]({{site.url}}{{site.baseurl}}/api-reference/tasks/) ID and the operation will run in background. Default is `true`. +wait_for_completion | Boolean | When set to `false`, the request will return immediately instead of waiting for the operation to finish. To monitor the operation status, use the [Tasks API]({{site.url}}{{site.baseurl}}/api-reference/tasks/) with the task ID that the request returns. Default is `true`. task_execution_timeout | Time | Explicit task execution timeout, only useful when wait_for_completion is false. Default is `1h`. diff --git a/_api-reference/index-apis/shrink-index.md b/_api-reference/index-apis/shrink-index.md index 858e1c4c73..b772dbd11c 100644 --- a/_api-reference/index-apis/shrink-index.md +++ b/_api-reference/index-apis/shrink-index.md @@ -51,7 +51,7 @@ Parameter | Type | description wait_for_active_shards | String | Specifies the number of active shards that must be available before OpenSearch processes the request. Default is 1 (only the primary shard). Set to all or a positive integer. Values greater than 1 require replicas. For example, if you specify a value of 3, the index must have two replicas distributed across two additional nodes for the request to succeed. master_timeout | Time | How long to wait for a connection to the master node. Default is `30s`. timeout | Time | How long to wait for the request to return a response. Default is `30s`. -wait_for_completion | Boolean | When set to `false`, the request will return a [task]({{site.url}}{{site.baseurl}}/api-reference/tasks/) ID and the operation will run in background. Default is `true`. +wait_for_completion | Boolean | When set to `false`, the request will return immediately instead of waiting for the operation to finish. To monitor the operation status, use the [Tasks API]({{site.url}}{{site.baseurl}}/api-reference/tasks/) with the task ID that the request returns. Default is `true`. task_execution_timeout | Time | Explicit task execution timeout, only useful when wait_for_completion is false. Default is `1h`. ## Request body diff --git a/_api-reference/index-apis/split.md b/_api-reference/index-apis/split.md index 6a7a9f8419..4ab518c13f 100644 --- a/_api-reference/index-apis/split.md +++ b/_api-reference/index-apis/split.md @@ -55,7 +55,7 @@ Parameter | Type | Description wait_for_active_shards | String | The number of active shards that must be available before OpenSearch processes the request. Default is 1 (only the primary shard). Set to all or a positive integer. Values greater than 1 require replicas. For example, if you specify a value of 3, the index must have two replicas distributed across two additional nodes for the operation to succeed. master_timeout | Time | How long to wait for a connection to the master node. Default is `30s`. timeout | Time | How long to wait for the request to return. Default is `30s`. -wait_for_completion | Boolean | When set to `false`, the request will return a [task]({{site.url}}{{site.baseurl}}/api-reference/tasks/) ID and the operation will run in background. Default is `true`. +wait_for_completion | Boolean | When set to `false`, the request will return immediately instead of waiting for the operation to finish. To monitor the operation status, use the [Tasks API]({{site.url}}{{site.baseurl}}/api-reference/tasks/) with the task ID that the request returns. Default is `true`. task_execution_timeout | Time | Explicit task execution timeout, only useful when wait_for_completion is false. Default is `1h`. ## Request body diff --git a/_im-plugin/ism/policies.md b/_im-plugin/ism/policies.md index 68dd42073f..9be5049ab8 100644 --- a/_im-plugin/ism/policies.md +++ b/_im-plugin/ism/policies.md @@ -117,7 +117,7 @@ Reduces the number of Lucene segments by merging the segments of individual shar Parameter | Description | Type | Required :--- | :--- |:--- |:--- | `max_num_segments` | The number of segments to reduce the shard to. | `number` | Yes -wait_for_completion | Boolean | When set to `false`, the request will return a [task]({{site.url}}{{site.baseurl}}/api-reference/tasks/) ID and the operation will run in background. Default is `true`. | No +wait_for_completion | Boolean | When set to `false`, the request will return immediately instead of waiting for the operation to finish. To monitor the operation status, use the [Tasks API]({{site.url}}{{site.baseurl}}/api-reference/tasks/) with the task ID that the request returns. Default is `true`. | No task_execution_timeout | Time | Explicit task execution timeout, only useful when wait_for_completion is false. Default is `1h`. | No ```json From 5b4228836e604bd200efb125f49f27ad947e61a8 Mon Sep 17 00:00:00 2001 From: Aria Marble <111301581+ariamarble@users.noreply.github.com> Date: Thu, 20 Apr 2023 08:36:11 -0700 Subject: [PATCH 10/11] Apply suggestions from code review Co-authored-by: Nathan Bower --- _api-reference/index-apis/clone.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_api-reference/index-apis/clone.md b/_api-reference/index-apis/clone.md index b8824617bf..bc956eddba 100644 --- a/_api-reference/index-apis/clone.md +++ b/_api-reference/index-apis/clone.md @@ -55,8 +55,8 @@ Parameter | Type | Description wait_for_active_shards | String | The number of active shards that must be available before OpenSearch processes the request. Default is 1 (only the primary shard). Set to all or a positive integer. Values greater than 1 require replicas. For example, if you specify a value of 3, the index must have two replicas distributed across two additional nodes for the operation to succeed. master_timeout | Time | How long to wait for a connection to the master node. Default is `30s`. timeout | Time | How long to wait for the request to return. Default is `30s`. -wait_for_completion | Boolean | When set to `false`, the request will return immediately instead of waiting for the operation to finish. To monitor the operation status, use the [Tasks API]({{site.url}}{{site.baseurl}}/api-reference/tasks/) with the task ID that the request returns. Default is `true`. -task_execution_timeout | Time | Explicit task execution timeout, only useful when wait_for_completion is false. Default is `1h`. +wait_for_completion | Boolean | When set to `false`, the request returns immediately instead of after the operation is finished. To monitor the operation status, use the [Tasks API]({{site.url}}{{site.baseurl}}/api-reference/tasks/) with the task ID returned by the request. Default is `true`. +task_execution_timeout | Time | The explicit task execution timeout. Only useful when wait_for_completion is set to `false`. Default is `1h`. ## Request body From 4d83b2a0065af2b5c4417906a7008765f0fb3a7e Mon Sep 17 00:00:00 2001 From: ariamarble Date: Thu, 20 Apr 2023 17:40:18 +0200 Subject: [PATCH 11/11] made editorial changes Signed-off-by: ariamarble --- _api-reference/index-apis/open-index.md | 4 ++-- _api-reference/index-apis/shrink-index.md | 4 ++-- _api-reference/index-apis/split.md | 4 ++-- _im-plugin/ism/policies.md | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/_api-reference/index-apis/open-index.md b/_api-reference/index-apis/open-index.md index e24674e00f..4097620acd 100644 --- a/_api-reference/index-apis/open-index.md +++ b/_api-reference/index-apis/open-index.md @@ -37,8 +37,8 @@ ignore_unavailable | Boolean | If true, OpenSearch does not search for missing o wait_for_active_shards | String | Specifies the number of active shards that must be available before OpenSearch processes the request. Default is 1 (only the primary shard). Set to all or a positive integer. Values greater than 1 require replicas. For example, if you specify a value of 3, the index must have two replicas distributed across two additional nodes for the request to succeed. master_timeout | Time | How long to wait for a connection to the master node. Default is `30s`. timeout | Time | How long to wait for a response from the cluster. Default is `30s`. -wait_for_completion | Boolean | When set to `false`, the request will return immediately instead of waiting for the operation to finish. To monitor the operation status, use the [Tasks API]({{site.url}}{{site.baseurl}}/api-reference/tasks/) with the task ID that the request returns. Default is `true`. -task_execution_timeout | Time | Explicit task execution timeout, only useful when wait_for_completion is false. Default is `1h`. +wait_for_completion | Boolean | When set to `false`, the request returns immediately instead of after the operation is finished. To monitor the operation status, use the [Tasks API]({{site.url}}{{site.baseurl}}/api-reference/tasks/) with the task ID returned by the request. Default is `true`. +task_execution_timeout | Time | The explicit task execution timeout. Only useful when wait_for_completion is set to `false`. Default is `1h`. ## Response diff --git a/_api-reference/index-apis/shrink-index.md b/_api-reference/index-apis/shrink-index.md index b772dbd11c..851e604094 100644 --- a/_api-reference/index-apis/shrink-index.md +++ b/_api-reference/index-apis/shrink-index.md @@ -51,8 +51,8 @@ Parameter | Type | description wait_for_active_shards | String | Specifies the number of active shards that must be available before OpenSearch processes the request. Default is 1 (only the primary shard). Set to all or a positive integer. Values greater than 1 require replicas. For example, if you specify a value of 3, the index must have two replicas distributed across two additional nodes for the request to succeed. master_timeout | Time | How long to wait for a connection to the master node. Default is `30s`. timeout | Time | How long to wait for the request to return a response. Default is `30s`. -wait_for_completion | Boolean | When set to `false`, the request will return immediately instead of waiting for the operation to finish. To monitor the operation status, use the [Tasks API]({{site.url}}{{site.baseurl}}/api-reference/tasks/) with the task ID that the request returns. Default is `true`. -task_execution_timeout | Time | Explicit task execution timeout, only useful when wait_for_completion is false. Default is `1h`. +wait_for_completion | Boolean | When set to `false`, the request returns immediately instead of after the operation is finished. To monitor the operation status, use the [Tasks API]({{site.url}}{{site.baseurl}}/api-reference/tasks/) with the task ID returned by the request. Default is `true`. +task_execution_timeout | Time | The explicit task execution timeout. Only useful when wait_for_completion is set to `false`. Default is `1h`. ## Request body diff --git a/_api-reference/index-apis/split.md b/_api-reference/index-apis/split.md index 4ab518c13f..80a0f9ca35 100644 --- a/_api-reference/index-apis/split.md +++ b/_api-reference/index-apis/split.md @@ -55,8 +55,8 @@ Parameter | Type | Description wait_for_active_shards | String | The number of active shards that must be available before OpenSearch processes the request. Default is 1 (only the primary shard). Set to all or a positive integer. Values greater than 1 require replicas. For example, if you specify a value of 3, the index must have two replicas distributed across two additional nodes for the operation to succeed. master_timeout | Time | How long to wait for a connection to the master node. Default is `30s`. timeout | Time | How long to wait for the request to return. Default is `30s`. -wait_for_completion | Boolean | When set to `false`, the request will return immediately instead of waiting for the operation to finish. To monitor the operation status, use the [Tasks API]({{site.url}}{{site.baseurl}}/api-reference/tasks/) with the task ID that the request returns. Default is `true`. -task_execution_timeout | Time | Explicit task execution timeout, only useful when wait_for_completion is false. Default is `1h`. +wait_for_completion | Boolean | When set to `false`, the request returns immediately instead of after the operation is finished. To monitor the operation status, use the [Tasks API]({{site.url}}{{site.baseurl}}/api-reference/tasks/) with the task ID returned by the request. Default is `true`. +task_execution_timeout | Time | The explicit task execution timeout. Only useful when wait_for_completion is set to `false`. Default is `1h`. ## Request body diff --git a/_im-plugin/ism/policies.md b/_im-plugin/ism/policies.md index 9be5049ab8..8e873268de 100644 --- a/_im-plugin/ism/policies.md +++ b/_im-plugin/ism/policies.md @@ -117,8 +117,8 @@ Reduces the number of Lucene segments by merging the segments of individual shar Parameter | Description | Type | Required :--- | :--- |:--- |:--- | `max_num_segments` | The number of segments to reduce the shard to. | `number` | Yes -wait_for_completion | Boolean | When set to `false`, the request will return immediately instead of waiting for the operation to finish. To monitor the operation status, use the [Tasks API]({{site.url}}{{site.baseurl}}/api-reference/tasks/) with the task ID that the request returns. Default is `true`. | No -task_execution_timeout | Time | Explicit task execution timeout, only useful when wait_for_completion is false. Default is `1h`. | No +wait_for_completion | Boolean | When set to `false`, the request returns immediately instead of after the operation is finished. To monitor the operation status, use the [Tasks API]({{site.url}}{{site.baseurl}}/api-reference/tasks/) with the task ID returned by the request. Default is `true`. +task_execution_timeout | Time | The explicit task execution timeout. Only useful when wait_for_completion is set to `false`. Default is `1h`. | No ```json {