Skip to content

Commit

Permalink
Add documentation for wait_for_completion API (#3458)
Browse files Browse the repository at this point in the history
* Add documentation for wait_for_completion API

Signed-off-by: ariamarble <[email protected]>

* draft update

Signed-off-by: ariamarble <[email protected]>

* small comment

Signed-off-by: ariamarble <[email protected]>

* page and toc updates

Signed-off-by: ariamarble <[email protected]>

* page updates

Signed-off-by: ariamarble <[email protected]>

* final changes

Signed-off-by: ariamarble <[email protected]>

* doc review changes

Signed-off-by: ariamarble <[email protected]>

* link to task api

Signed-off-by: ariamarble <[email protected]>

* further doc review updates

Signed-off-by: ariamarble <[email protected]>

* Apply suggestions from code review

Co-authored-by: Nathan Bower <[email protected]>

* made editorial changes

Signed-off-by: ariamarble <[email protected]>

---------

Signed-off-by: ariamarble <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
  • Loading branch information
2 people authored and vagimeli committed Apr 25, 2023
1 parent 3c2b47b commit 85a5aa6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions _api-reference/index-apis/clone.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 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

Expand Down
2 changes: 2 additions & 0 deletions _api-reference/index-apis/open-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 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
Expand Down
2 changes: 2 additions & 0 deletions _api-reference/index-apis/shrink-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 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

Expand Down
2 changes: 2 additions & 0 deletions _api-reference/index-apis/split.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 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

Expand Down
2 changes: 2 additions & 0 deletions _im-plugin/ism/policies.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 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
{
Expand Down

0 comments on commit 85a5aa6

Please sign in to comment.