mirror of
https://github.com/iSharkFly-Docs/opensearch-docs-cn
synced 2025-02-12 07:44:55 +00:00
* Add documentation for wait_for_completion API Signed-off-by: ariamarble <armarble@amazon.com> * draft update Signed-off-by: ariamarble <armarble@amazon.com> * small comment Signed-off-by: ariamarble <armarble@amazon.com> * page and toc updates Signed-off-by: ariamarble <armarble@amazon.com> * page updates Signed-off-by: ariamarble <armarble@amazon.com> * final changes Signed-off-by: ariamarble <armarble@amazon.com> * doc review changes Signed-off-by: ariamarble <armarble@amazon.com> * link to task api Signed-off-by: ariamarble <armarble@amazon.com> * further doc review updates Signed-off-by: ariamarble <armarble@amazon.com> * Apply suggestions from code review Co-authored-by: Nathan Bower <nbower@amazon.com> * made editorial changes Signed-off-by: ariamarble <armarble@amazon.com> --------- Signed-off-by: ariamarble <armarble@amazon.com> Co-authored-by: Nathan Bower <nbower@amazon.com>
2.2 KiB
2.2 KiB
layout | title | parent | nav_order |
---|---|---|---|
default | Open index | Index APIs | 40 |
Open index
Introduced 1.0 {: .label .label-purple }
The open index API operation opens a closed index, letting you add or search for data within the index.
Example
POST /sample-index/_open
{% include copy-curl.html %}
Path and HTTP methods
POST /<index-name>/_open
URL parameters
All parameters are optional.
Parameter | Type | Description |
---|---|---|
<index-name> | String | The index to open. Can be a comma-separated list of multiple index names. Use _all or * to open all indices. |
allow_no_indices | Boolean | Whether to ignore wildcards that don't match any indices. Default is true. |
expand_wildcards | String | Expands wildcard expressions to different indices. Combine multiple values with commas. Available values are all (match all indices), open (match open indices), closed (match closed indices), hidden (match hidden indices), and none (do not accept wildcard expressions). Default is open. |
ignore_unavailable | Boolean | If true, OpenSearch does not search for missing or closed indices. Default is false. |
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 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
{
"acknowledged": true,
"shards_acknowledged": true
}