[DOC] Format all API pages according to the API template (#5169)

* Fix APIs File

Signed-off-by: samipak458 <samipak458@gmail.com>

* Update API files according to API template

Signed-off-by: samipak458 <samipak458@gmail.com>

* Update exec-stored-script.md

Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com>

* Update cat-aliases.md

Signed-off-by: MUHAMMAD SAMIULLAH <samipak458@gmail.com>

* Update cat-allocation.md

Signed-off-by: MUHAMMAD SAMIULLAH <samipak458@gmail.com>

* Update cat-cluster_manager.md

Signed-off-by: MUHAMMAD SAMIULLAH <samipak458@gmail.com>

* Update cat-count.md

Signed-off-by: MUHAMMAD SAMIULLAH <samipak458@gmail.com>

* Update cat-field-data.md

Signed-off-by: MUHAMMAD SAMIULLAH <samipak458@gmail.com>

* Update cat-health.md

Signed-off-by: MUHAMMAD SAMIULLAH <samipak458@gmail.com>

* updated

* updated

* updated

---------

Signed-off-by: samipak458 <samipak458@gmail.com>
Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com>
Signed-off-by: MUHAMMAD SAMIULLAH <samipak458@gmail.com>
Co-authored-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com>
This commit is contained in:
MUHAMMAD SAMIULLAH 2023-10-23 19:53:52 +05:00 committed by GitHub
parent e88bdc416a
commit 84e4ab158e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
110 changed files with 303 additions and 167 deletions

View File

@ -9,6 +9,8 @@ redirect_from:
--- ---
# Analyze API # Analyze API
**Introduced 1.0**
{: .label .label-purple }
The Analyze API allows you to perform [text analysis]({{site.url}}{{site.baseurl}}/api-reference/analyze-apis/), which is the process of converting unstructured text into individual tokens (usually words) that are optimized for search. The Analyze API allows you to perform [text analysis]({{site.url}}{{site.baseurl}}/api-reference/analyze-apis/), which is the process of converting unstructured text into individual tokens (usually words) that are optimized for search.

View File

@ -10,7 +10,7 @@ has_children: false
--- ---
# CAT aliases # CAT aliases
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
The CAT aliases operation lists the mapping of aliases to indexes, plus routing and filtering information. The CAT aliases operation lists the mapping of aliases to indexes, plus routing and filtering information.

View File

@ -9,7 +9,7 @@ has_children: false
--- ---
# CAT allocation # CAT allocation
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
The CAT allocation operation lists the allocation of disk space for indexes and the number of shards on each node. The CAT allocation operation lists the allocation of disk space for indexes and the number of shards on each node.

View File

@ -9,7 +9,7 @@ has_children: false
--- ---
# CAT cluster_manager # CAT cluster_manager
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
The CAT cluster manager operation lists information that helps identify the elected cluster manager node. The CAT cluster manager operation lists information that helps identify the elected cluster manager node.
@ -36,6 +36,7 @@ In addition to the [common URL parameters]({{site.url}}{{site.baseurl}}/api-refe
Parameter | Type | Description Parameter | Type | Description
:--- | :--- | :--- :--- | :--- | :---
cluster_manager_timeout | Time | The amount of time to wait for a connection to the cluster manager node. Default is 30 seconds. cluster_manager_timeout | Time | The amount of time to wait for a connection to the cluster manager node. Default is 30 seconds.
## Response ## Response
```json ```json

View File

@ -10,7 +10,7 @@ redirect_from:
--- ---
# CAT count # CAT count
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
The CAT count operation lists the number of documents in your cluster. The CAT count operation lists the number of documents in your cluster.

View File

@ -9,7 +9,7 @@ redirect_from:
--- ---
# CAT fielddata # CAT fielddata
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
The CAT fielddata operation lists the memory size used by each field per node. The CAT fielddata operation lists the memory size used by each field per node.

View File

@ -10,7 +10,7 @@ redirect_from:
--- ---
# CAT health # CAT health
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
The CAT health operation lists the status of the cluster, how long the cluster has been up, the number of nodes, and other useful information that helps you analyze the health of your cluster. The CAT health operation lists the status of the cluster, how long the cluster has been up, the number of nodes, and other useful information that helps you analyze the health of your cluster.

View File

@ -9,7 +9,7 @@ redirect_from:
--- ---
# CAT indices # CAT indices
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
The CAT indices operation lists information related to indexes, that is, how much disk space they are using, how many shards they have, their health status, and so on. The CAT indices operation lists information related to indexes, that is, how much disk space they are using, how many shards they have, their health status, and so on.

View File

@ -9,7 +9,7 @@ redirect_from:
--- ---
# CAT nodeattrs # CAT nodeattrs
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
The CAT nodeattrs operation lists the attributes of custom nodes. The CAT nodeattrs operation lists the attributes of custom nodes.

View File

@ -10,7 +10,7 @@ redirect_from:
--- ---
# CAT nodes # CAT nodes
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
The CAT nodes operation lists node-level information, including node roles and load metrics. The CAT nodes operation lists node-level information, including node roles and load metrics.

View File

@ -10,7 +10,7 @@ redirect_from:
--- ---
# CAT pending tasks # CAT pending tasks
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
The CAT pending tasks operation lists the progress of all pending tasks, including task priority and time in queue. The CAT pending tasks operation lists the progress of all pending tasks, including task priority and time in queue.

View File

@ -10,7 +10,7 @@ redirect_from:
--- ---
# CAT plugins # CAT plugins
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
The CAT plugins operation lists the names, components, and versions of the installed plugins. The CAT plugins operation lists the names, components, and versions of the installed plugins.

View File

@ -10,7 +10,7 @@ redirect_from:
--- ---
# CAT recovery # CAT recovery
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
The CAT recovery operation lists all completed and ongoing index and shard recoveries. The CAT recovery operation lists all completed and ongoing index and shard recoveries.

View File

@ -10,7 +10,7 @@ redirect_from:
--- ---
# CAT repositories # CAT repositories
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
The CAT repositories operation lists all completed and ongoing index and shard recoveries. The CAT repositories operation lists all completed and ongoing index and shard recoveries.

View File

@ -7,7 +7,7 @@ has_children: false
--- ---
# CAT segment replication # CAT segment replication
Introduced 2.7 **Introduced 2.7**
{: .label .label-purple } {: .label .label-purple }
The CAT segment replication operation returns information about active and last completed [segment replication]({{site.url}}{{site.baseurl}}/opensearch/segment-replication/index) events on each replica shard, including related shard-level metrics. These metrics provide information about how far behind the primary shard the replicas are lagging. The CAT segment replication operation returns information about active and last completed [segment replication]({{site.url}}{{site.baseurl}}/opensearch/segment-replication/index) events on each replica shard, including related shard-level metrics. These metrics provide information about how far behind the primary shard the replicas are lagging.
@ -47,7 +47,7 @@ Parameter | Data type | Description
`v` | Boolean | If `true`, the response includes column headings. Defaults to `false`. `v` | Boolean | If `true`, the response includes column headings. Defaults to `false`.
`s` | String | Specifies to sort the results. For example, `s=shardId:desc` sorts by shardId in descending order. `s` | String | Specifies to sort the results. For example, `s=shardId:desc` sorts by shardId in descending order.
## Examples ## Example
The following examples illustrate various segment replication responses. The following examples illustrate various segment replication responses.

View File

@ -10,7 +10,7 @@ redirect_from:
--- ---
# CAT segments # CAT segments
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
The cat segments operation lists Lucene segment-level information for each index. The cat segments operation lists Lucene segment-level information for each index.

View File

@ -10,7 +10,7 @@ redirect_from:
--- ---
# CAT shards # CAT shards
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
The CAT shards operation lists the state of all primary and replica shards and how they are distributed. The CAT shards operation lists the state of all primary and replica shards and how they are distributed.

View File

@ -10,7 +10,7 @@ redirect_from:
--- ---
# CAT snapshots # CAT snapshots
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
The CAT snapshots operation lists all snapshots for a repository. The CAT snapshots operation lists all snapshots for a repository.

View File

@ -10,7 +10,7 @@ redirect_from:
--- ---
# CAT tasks # CAT tasks
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
The CAT tasks operation lists the progress of all tasks currently running on your cluster. The CAT tasks operation lists the progress of all tasks currently running on your cluster.

View File

@ -10,7 +10,7 @@ redirect_from:
--- ---
# CAT templates # CAT templates
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
The CAT templates operation lists the names, patterns, order numbers, and version numbers of index templates. The CAT templates operation lists the names, patterns, order numbers, and version numbers of index templates.

View File

@ -9,7 +9,7 @@ redirect_from:
--- ---
# CAT thread pool # CAT thread pool
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
The CAT thread pool operation lists the active, queued, and rejected threads of different thread pools on each node. The CAT thread pool operation lists the active, queued, and rejected threads of different thread pools on each node.

View File

@ -9,7 +9,8 @@ redirect_from:
--- ---
# CAT API # CAT API
**Introduced 1.0**
{: .label .label-purple }
You can get essential statistics about your cluster in an easy-to-understand, tabular format using the compact and aligned text (CAT) API. The CAT API is a human-readable interface that returns plain text instead of traditional JSON. You can get essential statistics about your cluster in an easy-to-understand, tabular format using the compact and aligned text (CAT) API. The CAT API is a human-readable interface that returns plain text instead of traditional JSON.
Using the CAT API, you can answer questions like which node is the elected master, what state is the cluster in, how many documents are in each index, and so on. Using the CAT API, you can answer questions like which node is the elected master, what state is the cluster in, how many documents are in each index, and so on.

View File

@ -9,7 +9,7 @@ redirect_from:
--- ---
# Cluster allocation explain # Cluster allocation explain
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
The most basic cluster allocation explain request finds an unassigned shard and explains why it can't be allocated to a node. The most basic cluster allocation explain request finds an unassigned shard and explains why it can't be allocated to a node.

View File

@ -10,6 +10,8 @@ redirect_from:
--- ---
# Cluster routing and awareness # Cluster routing and awareness
**Introduced 1.0**
{: .label .label-purple }
To control the distribution of search or HTTP traffic, you can use the weights per awareness attribute to control the distribution of search or HTTP traffic across zones. This is commonly used for zonal deployments, heterogeneous instances, and routing traffic away from zones during zonal failure. To control the distribution of search or HTTP traffic, you can use the weights per awareness attribute to control the distribution of search or HTTP traffic across zones. This is commonly used for zonal deployments, heterogeneous instances, and routing traffic away from zones during zonal failure.
@ -53,7 +55,7 @@ In the following example request body, `zone_1` and `zone_2` receive 50 requests
The following example request creates a round robin shard allocation for search traffic by using an undefined ratio: The following example request creates a round robin shard allocation for search traffic by using an undefined ratio:
### Request #### Request
```json ```json
PUT /_cluster/routing/awareness/zone/weights PUT /_cluster/routing/awareness/zone/weights
@ -69,7 +71,7 @@ PUT /_cluster/routing/awareness/zone/weights
``` ```
{% include copy-curl.html %} {% include copy-curl.html %}
### Response #### Response
``` ```
{ {
@ -82,14 +84,14 @@ PUT /_cluster/routing/awareness/zone/weights
The following example request gets weights for all zones. The following example request gets weights for all zones.
### Request #### Request
```json ```json
GET /_cluster/routing/awareness/zone/weights GET /_cluster/routing/awareness/zone/weights
``` ```
{% include copy-curl.html %} {% include copy-curl.html %}
### Response #### Response
OpenSearch responds with the weight of each zone: OpenSearch responds with the weight of each zone:
@ -110,14 +112,14 @@ OpenSearch responds with the weight of each zone:
You can remove your weight ratio for each zone using the `DELETE` method. You can remove your weight ratio for each zone using the `DELETE` method.
### Request #### Request
```json ```json
DELETE /_cluster/routing/awareness/zone/weights DELETE /_cluster/routing/awareness/zone/weights
``` ```
{% include copy-curl.html %} {% include copy-curl.html %}
### Response #### Response
```json ```json
{ {

View File

@ -10,6 +10,8 @@ redirect_from:
--- ---
# Cluster decommission # Cluster decommission
**Introduced 1.0**
{: .label .label-purple }
The cluster decommission operation adds support decommissioning based on awareness. It greatly benefits multi-zone deployments, where awareness attributes, such as `zones`, can aid in applying new upgrades to a cluster in a controlled fashion. This is especially useful during outages, in which case, you can decommission the unhealthy zone to prevent replication requests from stalling and prevent your request backlog from becoming too large. The cluster decommission operation adds support decommissioning based on awareness. It greatly benefits multi-zone deployments, where awareness attributes, such as `zones`, can aid in applying new upgrades to a cluster in a controlled fashion. This is especially useful during outages, in which case, you can decommission the unhealthy zone to prevent replication requests from stalling and prevent your request backlog from becoming too large.
@ -36,7 +38,7 @@ awareness_attribute_value | String | The value of the awareness attribute. For e
You can use the following example requests to decommission and recommission a zone: You can use the following example requests to decommission and recommission a zone:
### Request #### Request
The following example request decommissions `zone-a`: The following example request decommissions `zone-a`:
@ -52,7 +54,7 @@ DELETE /_cluster/decommission/awareness
``` ```
{% include copy-curl.html %} {% include copy-curl.html %}
### Response #### Response
```json ```json
@ -65,14 +67,14 @@ DELETE /_cluster/decommission/awareness
The following example requests returns the decommission status of all zones. The following example requests returns the decommission status of all zones.
### Request #### Request
```json ```json
GET /_cluster/decommission/awareness/zone/_status GET /_cluster/decommission/awareness/zone/_status
``` ```
{% include copy-curl.html %} {% include copy-curl.html %}
### Response #### Response
```json ```json
{ {

View File

@ -10,7 +10,7 @@ redirect_from:
--- ---
# Cluster health # Cluster health
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
The most basic cluster health request returns a simple status of the health of your cluster. OpenSearch expresses cluster health in three colors: green, yellow, and red. A green status means all primary shards and their replicas are allocated to nodes. A yellow status means all primary shards are allocated to nodes, but some replicas aren't. A red status means at least one primary shard is not allocated to any node. The most basic cluster health request returns a simple status of the health of your cluster. OpenSearch expresses cluster health in three colors: green, yellow, and red. A green status means all primary shards and their replicas are allocated to nodes. A yellow status means all primary shards are allocated to nodes, but some replicas aren't. A red status means at least one primary shard is not allocated to any node.

View File

@ -9,19 +9,19 @@ redirect_from:
--- ---
# Cluster settings # Cluster settings
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
The cluster settings operation lets you check the current settings for your cluster, review default settings, and change settings. When you update a setting using the API, OpenSearch applies it to all nodes in the cluster. The cluster settings operation lets you check the current settings for your cluster, review default settings, and change settings. When you update a setting using the API, OpenSearch applies it to all nodes in the cluster.
### Path and HTTP methods ## Path and HTTP methods
``` ```
GET _cluster/settings GET _cluster/settings
PUT _cluster/settings PUT _cluster/settings
``` ```
### Path parameters ## Path parameters
All cluster setting parameters are optional. All cluster setting parameters are optional.
@ -51,7 +51,7 @@ PUT _cluster/settings
} }
``` ```
### Request fields ## Request fields
The GET operation has no request body options. All cluster setting field parameters are optional. The GET operation has no request body options. All cluster setting field parameters are optional.

View File

@ -10,12 +10,12 @@ redirect_from:
--- ---
# Cluster stats # Cluster stats
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
The cluster stats API operation returns statistics about your cluster. The cluster stats API operation returns statistics about your cluster.
## Examples ## Example
```json ```json
GET _cluster/stats/nodes/_cluster_manager GET _cluster/stats/nodes/_cluster_manager
@ -29,7 +29,6 @@ GET _cluster/stats
GET _cluster/stats/nodes/<node-filters> GET _cluster/stats/nodes/<node-filters>
``` ```
## URL parameters ## URL parameters
All cluster stats parameters are optional. All cluster stats parameters are optional.

View File

@ -8,5 +8,7 @@ redirect_from:
--- ---
# Cluster APIs # Cluster APIs
**Introduced 1.0**
{: .label .label-purple }|
The cluster APIs allow you to manage your cluster. You can use them to check cluster health, modify settings, retrieve statistics, and more. The cluster APIs allow you to manage your cluster. You can use them to check cluster health, modify settings, retrieve statistics, and more.

View File

@ -7,6 +7,8 @@ redirect_from:
--- ---
# Common REST parameters # Common REST parameters
**Introduced 1.0**
{: .label .label-purple }
OpenSearch supports the following parameters for all REST operations: OpenSearch supports the following parameters for all REST operations:
@ -14,7 +16,7 @@ OpenSearch supports the following parameters for all REST operations:
To convert output units to human-readable values (for example, `1h` for 1 hour and `1kb` for 1,024 bytes), add `?human=true` to the request URL. To convert output units to human-readable values (for example, `1h` for 1 hour and `1kb` for 1,024 bytes), add `?human=true` to the request URL.
### Example request #### Example request
The following request requires response values to be in human-readable format: The following request requires response values to be in human-readable format:
@ -27,7 +29,7 @@ GET <index_name>/_search?human=true
To get back JSON responses in a readable format, add `?pretty=true` to the request URL. To get back JSON responses in a readable format, add `?pretty=true` to the request URL.
### Example request #### Example request
The following request requires the response to be displayed in pretty JSON format: The following request requires the response to be displayed in pretty JSON format:
@ -40,7 +42,7 @@ GET <index_name>/_search?pretty=true
To specify the type of content in the request body, use the `Content-Type` key name in the request header. Most operations support JSON, YAML, and CBOR formats. To specify the type of content in the request body, use the `Content-Type` key name in the request header. Most operations support JSON, YAML, and CBOR formats.
### Example request #### Example request
The following request specifies JSON format for the request body: The following request specifies JSON format for the request body:
@ -54,7 +56,7 @@ curl -H "Content-type: application/json" -XGET localhost:9200/_scripts/<template
If the client library does not accept a request body for non-POST requests, use the `source` query string parameter to pass the request body. Also, specify the `source_content_type` parameter with a supported media type such as `application/json`. If the client library does not accept a request body for non-POST requests, use the `source` query string parameter to pass the request body. Also, specify the `source_content_type` parameter with a supported media type such as `application/json`.
### Example request #### Example request
The following request searches the documents in the `shakespeare` index for a specific field and value: The following request searches the documents in the `shakespeare` index for a specific field and value:
@ -67,7 +69,7 @@ GET shakespeare/search?source={"query":{"exists":{"field":"speaker"}}}&source_co
To include the error stack trace in the response when an exception is raised, add `error_trace=true` to the request URL. To include the error stack trace in the response when an exception is raised, add `error_trace=true` to the request URL.
### Example request #### Example request
The following request sets `error_trace` to `true` so that the response returns exception-triggered errors: The following request sets `error_trace` to `true` so that the response returns exception-triggered errors:
@ -80,7 +82,7 @@ GET <index_name>/_search?error_trace=true
To reduce the response size use the `filter_path` parameter to filter the fields that are returned. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field's name. You can also exclude fields with `-`. To reduce the response size use the `filter_path` parameter to filter the fields that are returned. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field's name. You can also exclude fields with `-`.
### Example request #### Example request
The following request specifies filters to limit the fields returned in the response: The following request specifies filters to limit the fields returned in the response:

View File

@ -7,13 +7,12 @@ redirect_from:
--- ---
# Count # Count
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
The count API gives you quick access to the number of documents that match a query. The count API gives you quick access to the number of documents that match a query.
You can also use it to check the document count of an index, data stream, or cluster. You can also use it to check the document count of an index, data stream, or cluster.
## Example ## Example
To see the number of documents that match a query: To see the number of documents that match a query:

View File

@ -8,7 +8,7 @@ redirect_from:
--- ---
# Bulk # Bulk
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
The bulk operation lets you add, update, or delete multiple documents in a single request. Compared to individual OpenSearch indexing requests, the bulk operation has significant performance benefits. Whenever practical, we recommend batching indexing operations into bulk requests. The bulk operation lets you add, update, or delete multiple documents in a single request. Compared to individual OpenSearch indexing requests, the bulk operation has significant performance benefits. Whenever practical, we recommend batching indexing operations into bulk requests.

View File

@ -8,7 +8,7 @@ redirect_from:
--- ---
# Delete by query # Delete by query
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple} {: .label .label-purple}
You can include a query as part of your delete request so OpenSearch deletes all documents that match that query. You can include a query as part of your delete request so OpenSearch deletes all documents that match that query.

View File

@ -8,7 +8,7 @@ redirect_from:
--- ---
# Delete document # Delete document
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
If you no longer need a document in your index, you can use the delete document API operation to delete it. If you no longer need a document in your index, you can use the delete document API operation to delete it.

View File

@ -8,7 +8,7 @@ redirect_from:
--- ---
# Get document # Get document
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
After adding a JSON document to your index, you can use the get document API operation to retrieve the document's information and data. After adding a JSON document to your index, you can use the get document API operation to retrieve the document's information and data.

View File

@ -8,7 +8,7 @@ redirect_from:
--- ---
# Index document # Index document
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple} {: .label .label-purple}
Before you can search for data, you must first add documents. This operation adds a single document to your index. Before you can search for data, you must first add documents. This operation adds a single document to your index.

View File

@ -8,6 +8,8 @@ redirect_from:
--- ---
# Document APIs # Document APIs
**Introduced 1.0**
{: .label .label-purple }
The document APIs allow you to handle documents relative to your index, such as adding, updating, and deleting documents. The document APIs allow you to handle documents relative to your index, such as adding, updating, and deleting documents.

View File

@ -8,7 +8,7 @@ redirect_from:
--- ---
# Multi-get documents # Multi-get documents
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
The multi-get operation allows you to run multiple GET operations in one request, so you can get back all documents that match your criteria. The multi-get operation allows you to run multiple GET operations in one request, so you can get back all documents that match your criteria.

View File

@ -9,7 +9,7 @@ redirect_from:
--- ---
# Reindex document # Reindex document
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple} {: .label .label-purple}
The reindex document API operation lets you copy all or a subset of your data from a source index into a destination index. The reindex document API operation lets you copy all or a subset of your data from a source index into a destination index.

View File

@ -8,7 +8,7 @@ redirect_from:
--- ---
# Update by query # Update by query
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple} {: .label .label-purple}
You can include a query and a script as part of your update request so OpenSearch can run the script to update all of the documents that match the query. You can include a query and a script as part of your update request so OpenSearch can run the script to update all of the documents that match the query.

View File

@ -8,7 +8,7 @@ redirect_from:
--- ---
# Update document # Update document
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
If you need to update a document's fields in your index, you can use the update document API operation. You can do so by specifying the new data you want in your index or by including a script in your request body, which OpenSearch runs to update the document. If you need to update a document's fields in your index, you can use the update document API operation. You can do so by specifying the new data you want in your index or by including a script in your request body, which OpenSearch runs to update the document.

View File

@ -7,7 +7,7 @@ redirect_from:
--- ---
# Explain # Explain
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
Wondering why a specific document ranks higher (or lower) for a query? You can use the explain API for an explanation of how the relevance score (`_score`) is calculated for every result. Wondering why a specific document ranks higher (or lower) for a query? You can use the explain API for an explanation of how the relevance score (`_score`) is calculated for every result.

View File

@ -9,7 +9,7 @@ redirect_from:
--- ---
# Alias # Alias
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
An alias is a virtual pointer that you can use to reference one or more indexes. Creating and updating aliases are atomic operations, so you can reindex your data and point an alias at it without any downtime. An alias is a virtual pointer that you can use to reference one or more indexes. Creating and updating aliases are atomic operations, so you can reindex your data and point an alias at it without any downtime.

View File

@ -6,6 +6,8 @@ nav_order: 10
--- ---
# Clear cache # Clear cache
**Introduced 1.0**
{: .label .label-purple }
The clear cache API operation clears the caches of one or more indexes. For data streams, the API clears the caches of the streams backing indexes. The clear cache API operation clears the caches of one or more indexes. For data streams, the API clears the caches of the streams backing indexes.
@ -36,11 +38,11 @@ All query parameters are optional.
| query | Boolean | If `true`, clears the query cache. Defaults to `true`. | | query | Boolean | If `true`, clears the query cache. Defaults to `true`. |
| request | Boolean | If `true`, clears the request cache. Defaults to `true`. | | request | Boolean | If `true`, clears the request cache. Defaults to `true`. |
## Example requests #### Example requests
The following example requests show multiple clear cache API uses. The following example requests show multiple clear cache API uses.
### Clear a specific cache ##### Clear a specific cache
The following request clears the fields cache only: The following request clears the fields cache only:
@ -67,7 +69,7 @@ POST /my-index/_cache/clear?request=true
``` ```
{% include copy-curl.html %} {% include copy-curl.html %}
### Clear the cache for specific fields #### Clear the cache for specific fields
The following request clears the fields caches of `fielda` and `fieldb`: The following request clears the fields caches of `fielda` and `fieldb`:
@ -76,7 +78,7 @@ POST /my-index/_cache/clear?fields=fielda,fieldb
``` ```
{% include copy-curl.html %} {% include copy-curl.html %}
### Clear caches for specific data streams or indexes #### Clear caches for specific data streams or indexes
The following request clears the cache for two specific indexes: The following request clears the cache for two specific indexes:
@ -85,7 +87,7 @@ POST /my-index,my-index2/_cache/clear
``` ```
{% include copy-curl.html %} {% include copy-curl.html %}
### Clear caches for all data streams and indexes #### Clear caches for all data streams and indexes
The following request clears the cache for all data streams and indexes: The following request clears the cache for all data streams and indexes:
@ -94,7 +96,7 @@ POST /_cache/clear
``` ```
{% include copy-curl.html %} {% include copy-curl.html %}
### Clear unused entries from the cache on search-capable nodes #### Clear unused entries from the cache on search-capable nodes
```json ```json
POST /*/_cache/clear?file=true POST /*/_cache/clear?file=true
@ -115,7 +117,7 @@ The `POST /books,hockey/_cache/clear` request returns the following fields:
} }
``` ```
#### Response fields ## Response fields
The `POST /books,hockey/_cache/clear` request returns the following response fields: The `POST /books,hockey/_cache/clear` request returns the following response fields:

View File

@ -8,6 +8,8 @@ redirect_from:
--- ---
# Clone index # Clone index
**Introduced 1.0**
{: .label .label-purple }
The clone index API operation clones all data in an existing read-only index into a new index. The new index cannot already exist. The clone index API operation clones all data in an existing read-only index into a new index. The new index cannot already exist.

View File

@ -8,12 +8,12 @@ redirect_from:
--- ---
# Close index # Close index
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
The close index API operation closes an index. Once an index is closed, you cannot add data to it or search for any data within the index. The close index API operation closes an index. Once an index is closed, you cannot add data to it or search for any data within the index.
## Example #### Example
```json ```json
POST /sample-index/_close POST /sample-index/_close

View File

@ -9,7 +9,7 @@ redirect_from:
--- ---
# Create index # Create index
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
While you can create an index by using a document as a base, you can also create an empty index for later use. While you can create an index by using a document as a base, you can also create an empty index for later use.

View File

@ -6,6 +6,8 @@ nav_order: 30
--- ---
# Dangling indexes API # Dangling indexes API
**Introduced 1.0**
{: .label .label-purple }
After a node joins a cluster, dangling indexes occur if any shards exist in the node's local directory that do not already exist in the cluster. Dangling indexes can be listed, deleted, or imported. After a node joins a cluster, dangling indexes occur if any shards exist in the node's local directory that do not already exist in the cluster. Dangling indexes can be listed, deleted, or imported.

View File

@ -8,7 +8,7 @@ redirect_from:
--- ---
# Delete index # Delete index
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
If you no longer need an index, you can use the delete index API operation to delete it. If you no longer need an index, you can use the delete index API operation to delete it.

View File

@ -8,7 +8,7 @@ redirect_from:
--- ---
# Index exists # Index exists
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
The index exists API operation returns whether or not an index already exists. The index exists API operation returns whether or not an index already exists.

View File

@ -8,7 +8,7 @@ redirect_from:
--- ---
# Get index # Get index
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
You can use the get index API operation to return information about an index. You can use the get index API operation to return information about an index.

View File

@ -8,7 +8,7 @@ redirect_from:
--- ---
# Get settings # Get settings
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
The get settings API operation returns all the settings in your index. The get settings API operation returns all the settings in your index.

View File

@ -8,6 +8,8 @@ redirect_from:
--- ---
# Index APIs # Index APIs
**Introduced 1.0**
{: .label .label-purple }
The index API operations let you interact with indexes in your cluster. Using these operations, you can create, delete, close, and complete other index-related operations. The index API operations let you interact with indexes in your cluster. Using these operations, you can create, delete, close, and complete other index-related operations.

View File

@ -8,7 +8,7 @@ redirect_from:
--- ---
# Open index # Open index
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
The open index API operation opens a closed index, letting you add or search for data within the index. The open index API operation opens a closed index, letting you add or search for data within the index.

View File

@ -9,7 +9,7 @@ redirect_from:
--- ---
# Create or update mappings # Create or update mappings
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
If you want to create or add mappings and fields to an index, you can use the put mapping API operation. For an existing mapping, this operation updates the mapping. If you want to create or add mappings and fields to an index, you can use the put mapping API operation. For an existing mapping, this operation updates the mapping.

View File

@ -8,6 +8,8 @@ redirect_from:
--- ---
# Shrink index # Shrink index
**Introduced 1.0**
{: .label .label-purple }
The shrink index API operation moves all of your data in an existing index into a new index with fewer primary shards. The shrink index API operation moves all of your data in an existing index into a new index with fewer primary shards.

View File

@ -8,6 +8,8 @@ redirect_from:
--- ---
# Split index # Split index
**Introduced 1.0**
{: .label .label-purple }
The split index API operation splits an existing read-only index into a new index, cutting each primary shard into some amount of primary shards in the new index. The split index API operation splits an existing read-only index into a new index, cutting each primary shard into some amount of primary shards in the new index.

View File

@ -6,6 +6,8 @@ nav_order: 72
--- ---
# Index Stats # Index Stats
**Introduced 1.0**
{: .label .label-purple }
The Index Stats API provides index statistics. For data streams, the API provides statistics for the stream's backing indexes. By default, the returned statistics are index level. To receive shard-level statistics, set the `level` parameter to `shards`. The Index Stats API provides index statistics. For data streams, the API provides statistics for the stream's backing indexes. By default, the returned statistics are index level. To receive shard-level statistics, set the `level` parameter to `shards`.

View File

@ -8,7 +8,7 @@ redirect_from:
--- ---
# Update settings # Update settings
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
You can use the update settings API operation to update index-level settings. You can change dynamic index settings at any time, but static settings cannot be changed after index creation. For more information about static and dynamic index settings, see [Create index]({{site.url}}{{site.baseurl}}/api-reference/index-apis/create-index/). You can use the update settings API operation to update index-level settings. You can change dynamic index settings at any time, but static settings cannot be changed after index creation. For more information about static and dynamic index settings, see [Create index]({{site.url}}{{site.baseurl}}/api-reference/index-apis/create-index/).

View File

@ -10,6 +10,8 @@ redirect_from:
--- ---
# REST API reference # REST API reference
**Introduced 1.0**
{: .label .label-purple }
You can use REST APIs for most operations in OpenSearch. In this reference, we provide a description of the API, and details that include the paths and HTTP methods, supported parameters, and example requests and responses. You can use REST APIs for most operations in OpenSearch. In this reference, we provide a description of the API, and details that include the paths and HTTP methods, supported parameters, and example requests and responses.

View File

@ -8,6 +8,8 @@ redirect_from:
--- ---
# Ingest APIs # Ingest APIs
**Introduced 1.0**
{: .label .label-purple }
Ingest APIs are a valuable tool for loading data into a system. Ingest APIs work together with [ingest pipelines]({{site.url}}{{site.baseurl}}/api-reference/ingest-apis/ingest-pipelines/) and [ingest processors]({{site.url}}{{site.baseurl}}/api-reference/ingest-apis/ingest-processors/) to process or transform data from a variety of sources and in a variety of formats. Ingest APIs are a valuable tool for loading data into a system. Ingest APIs work together with [ingest pipelines]({{site.url}}{{site.baseurl}}/api-reference/ingest-apis/ingest-pipelines/) and [ingest processors]({{site.url}}{{site.baseurl}}/api-reference/ingest-apis/ingest-processors/) to process or transform data from a variety of sources and in a variety of formats.

View File

@ -7,12 +7,11 @@ redirect_from:
--- ---
# Multi-search # Multi-search
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
As the name suggests, the multi-search operation lets you bundle multiple search requests into a single request. OpenSearch then executes the searches in parallel, so you get back the response more quickly compared to sending one request per search. OpenSearch executes each search independently, so the failure of one doesn't affect the others. As the name suggests, the multi-search operation lets you bundle multiple search requests into a single request. OpenSearch then executes the searches in parallel, so you get back the response more quickly compared to sending one request per search. OpenSearch executes each search independently, so the failure of one doesn't affect the others.
## Example ## Example
```json ```json

View File

@ -6,6 +6,8 @@ nav_order: 50
--- ---
# Nodes API # Nodes API
**Introduced 1.0**
{: .label .label-purple }
The nodes API makes it possible to retrieve information about individual nodes within your cluster. The nodes API makes it possible to retrieve information about individual nodes within your cluster.

View File

@ -6,10 +6,12 @@ nav_order: 30
--- ---
# Nodes hot threads # Nodes hot threads
**Introduced 1.0**
{: .label .label-purple }
The nodes hot threads endpoint provides information about busy JVM threads for selected cluster nodes. It provides a unique view of the of activity each node. The nodes hot threads endpoint provides information about busy JVM threads for selected cluster nodes. It provides a unique view of the of activity each node.
## Example #### Example
```json ```json
GET /_nodes/hot_threads GET /_nodes/hot_threads

View File

@ -6,6 +6,8 @@ nav_order: 10
--- ---
# Nodes info # Nodes info
**Introduced 1.0**
{: .label .label-purple }
The nodes info API represents mostly static information about your cluster's nodes, including but not limited to: The nodes info API represents mostly static information about your cluster's nodes, including but not limited to:

View File

@ -6,6 +6,8 @@ nav_order: 50
--- ---
# Nodes reload secure settings # Nodes reload secure settings
**Introduced 1.0**
{: .label .label-purple }
The nodes reload secure settings endpoint allows you to change secure settings on a node and reload the secure settings without restarting the node. The nodes reload secure settings endpoint allows you to change secure settings on a node and reload the secure settings without restarting the node.

View File

@ -6,6 +6,8 @@ nav_order: 20
--- ---
# Nodes stats # Nodes stats
**Introduced 1.0**
{: .label .label-purple }
The nodes stats API returns statistics about your cluster. The nodes stats API returns statistics about your cluster.

View File

@ -6,6 +6,8 @@ nav_order: 40
--- ---
# Nodes usage # Nodes usage
**Introduced 1.0**
{: .label .label-purple }
The nodes usage endpoint returns low-level information about REST action usage on nodes. The nodes usage endpoint returns low-level information about REST action usage on nodes.

View File

@ -7,6 +7,8 @@ redirect_from:
--- ---
# Popular APIs # Popular APIs
**Introduced 1.0**
{: .label .label-purple }
This page contains example requests for popular OpenSearch operations. This page contains example requests for popular OpenSearch operations.

View File

@ -5,6 +5,8 @@ nav_order: 55
--- ---
# Profile # Profile
**Introduced 1.0**
{: .label .label-purple }
The Profile API provides timing information about the execution of individual components of a search request. Using the Profile API, you can debug slow requests and understand how to improve their performance. The Profile API does not measure the following: The Profile API provides timing information about the execution of individual components of a search request. Using the Profile API, you can debug slow requests and understand how to improve their performance. The Profile API does not measure the following:

View File

@ -5,6 +5,8 @@ nav_order: 60
--- ---
# Ranking evaluation # Ranking evaluation
**Introduced 1.0**
{: .label .label-purple }
The [rank]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/rank/) eval endpoint allows you to evaluate the quality of ranked search results. The [rank]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/rank/) eval endpoint allows you to evaluate the quality of ranked search results.

View File

@ -7,7 +7,7 @@ redirect_from:
--- ---
# Remote cluster information # Remote cluster information
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
This operation provides connection information for any remote OpenSearch clusters that you've configured for the local cluster, such as the remote cluster alias, connection mode (`sniff` or `proxy`), IP addresses for seed nodes, and timeout settings. This operation provides connection information for any remote OpenSearch clusters that you've configured for the local cluster, such as the remote cluster alias, connection mode (`sniff` or `proxy`), IP addresses for seed nodes, and timeout settings.

View File

@ -5,7 +5,9 @@ parent: Script APIs
nav_order: 1 nav_order: 1
--- ---
## Create or update stored script # Create or update stored script
**Introduced 1.0**
{: .label .label-purple }
Creates or updates a stored script or search template. Creates or updates a stored script or search template.
@ -16,13 +18,13 @@ For additional information about Painless scripting, see:
* [k-NN]({{site.url}}{{site.baseurl}}/search-plugins/knn/index/). * [k-NN]({{site.url}}{{site.baseurl}}/search-plugins/knn/index/).
### Path parameters ## Path parameters
| Parameter | Data type | Description | | Parameter | Data type | Description |
:--- | :--- | :--- :--- | :--- | :---
| script-id | String | Stored script or search template ID. Must be unique across the cluster. Required. | | script-id | String | Stored script or search template ID. Must be unique across the cluster. Required. |
### Query parameters ## Query parameters
All parameters are optional. All parameters are optional.
@ -32,7 +34,7 @@ All parameters are optional.
| cluster_manager_timeout | Time | Amount of time to wait for a connection to the cluster manager. Defaults to 30 seconds. | | cluster_manager_timeout | Time | Amount of time to wait for a connection to the cluster manager. Defaults to 30 seconds. |
| timeout | Time | The period of time to wait for a response. If a response is not received before the timeout value, the request fails and returns an error. Defaults to 30 seconds.| | timeout | Time | The period of time to wait for a response. If a response is not received before the timeout value, the request fails and returns an error. Defaults to 30 seconds.|
### Request fields ## Request fields
| Field | Data type | Description | | Field | Data type | Description |
:--- | :--- | :--- :--- | :--- | :---
@ -138,7 +140,7 @@ To determine whether the script was successfully created, use the [Get stored sc
The Painless script supports `params` to pass variables to the script. The Painless script supports `params` to pass variables to the script.
### Example #### Example
The following request creates the Painless script `multiplier-script`. The request sums the ratings for each book, multiplies the summed value by the `multiplier` parameter, and displays the result in the output: The following request creates the Painless script `multiplier-script`. The request sums the ratings for each book, multiplies the summed value by the `multiplier` parameter, and displays the result in the output:

View File

@ -5,11 +5,13 @@ parent: Script APIs
nav_order: 4 nav_order: 4
--- ---
## Delete script # Delete script
**Introduced 1.0**
{: .label .label-purple }
Deletes a stored script Deletes a stored script
### Path parameters ## Path parameters
Path parameters are optional. Path parameters are optional.
@ -17,7 +19,7 @@ Path parameters are optional.
:--- | :--- | :--- :--- | :--- | :---
| script-id | String | ID of script to delete. | | script-id | String | ID of script to delete. |
### Query parameters ## Query parameters
| Parameter | Data type | Description | | Parameter | Data type | Description |
:--- | :--- | :--- :--- | :--- | :---
@ -45,7 +47,7 @@ The `DELETE _scripts/my-first-script` request returns the following field:
To determine whether the stored script was successfully deleted, use the [Get stored script]({{site.url}}{{site.baseurl}}/api-reference/script-apis/get-stored-script/) API, passing the script name as the `script` path parameter. To determine whether the stored script was successfully deleted, use the [Get stored script]({{site.url}}{{site.baseurl}}/api-reference/script-apis/get-stored-script/) API, passing the script name as the `script` path parameter.
### Response fields ## Response fields
The <HTTP METHOD> <endpoint> request returns the following response fields: The <HTTP METHOD> <endpoint> request returns the following response fields:

View File

@ -5,18 +5,20 @@ parent: Script APIs
nav_order: 7 nav_order: 7
--- ---
## Execute Painless script # Execute Painless script
**Introduced 1.0**
{: .label .label-purple }
The Execute Painless script API allows you to run a script that is not stored. The Execute Painless script API allows you to run a script that is not stored.
### Path and HTTP methods ## Path and HTTP methods
```json ```json
GET /_scripts/painless/_execute GET /_scripts/painless/_execute
POST /_scripts/painless/_execute POST /_scripts/painless/_execute
``` ```
### Request fields ## Request fields
| Field | Description | | Field | Description |
:--- | :--- :--- | :---
@ -52,7 +54,7 @@ The response contains the average of two script parameters:
} }
``` ```
### Response fields ## Response fields
| Field | Description | | Field | Description |
:--- | :--- :--- | :---
@ -63,11 +65,11 @@ The response contains the average of two script parameters:
Choose different contexts to control the variables that are available to the script and the result's return type. The default context is `painless_test`. Choose different contexts to control the variables that are available to the script and the result's return type. The default context is `painless_test`.
### Painless test context ## Painless test context
The `painless_test` context is the default script context that provides only the `params` variable to the script. The returned result is always converted to a string. See the preceding example request for a usage example. The `painless_test` context is the default script context that provides only the `params` variable to the script. The returned result is always converted to a string. See the preceding example request for a usage example.
### Filter context ## Filter context
The `filter` context runs the script as if the script were inside a script query. You must provide a test document in the context. The `_source`, stored fields, and `_doc` variables will be available to the script. The `filter` context runs the script as if the script were inside a script query. You must provide a test document in the context. The `_source`, stored fields, and `_doc` variables will be available to the script.
@ -128,7 +130,7 @@ The response contains the result:
} }
``` ```
### Score context ## Score context
The `score` context runs a script as if the script were in a `script_score` function in a `function_score` query. The `score` context runs a script as if the script were in a `script_score` function in a `function_score` query.

View File

@ -5,13 +5,15 @@ parent: Script APIs
nav_order: 2 nav_order: 2
--- ---
## Execute Painless stored script # Execute Painless stored script
**Introduced 1.0**
{: .label .label-purple }
Runs a stored script written in the Painless language. Runs a stored script written in the Painless language.
OpenSearch provides several ways to run a script; the following sections show how to run a script by passing script information in the request body of a `GET <index>/_search` request. OpenSearch provides several ways to run a script; the following sections show how to run a script by passing script information in the request body of a `GET <index>/_search` request.
### Request fields ## Request fields
| Field | Data type | Description | | Field | Data type | Description |
:--- | :--- | :--- :--- | :--- | :---
@ -102,7 +104,7 @@ The `GET books/_search` request returns the following fields:
} }
```` ````
### Response fields ## Response fields
| Field | Data type | Description | | Field | Data type | Description |
:--- | :--- | :--- :--- | :--- | :---
@ -132,7 +134,7 @@ The `GET books/_search` request returns the following fields:
To pass different parameters to the script each time when running a query, define `params` in `script_fields`. To pass different parameters to the script each time when running a query, define `params` in `script_fields`.
### Example #### Example
The following request runs the stored script that was created in [Create or update stored script]({{site.url}}{{site.baseurl}}/api-reference/script-apis/create-stored-script/). The script sums the ratings for each book, multiplies the summed value by the `multiplier` parameter, and displays the result in the output. The following request runs the stored script that was created in [Create or update stored script]({{site.url}}{{site.baseurl}}/api-reference/script-apis/create-stored-script/). The script sums the ratings for each book, multiplies the summed value by the `multiplier` parameter, and displays the result in the output.
@ -144,7 +146,7 @@ The following request runs the stored script that was created in [Create or upda
* `"multiplier": 2` in the `params` field is a variable passed to the stored script `multiplier-script`: * `"multiplier": 2` in the `params` field is a variable passed to the stored script `multiplier-script`:
````json ```json
GET books/_search GET books/_search
{ {
"query": { "query": {
@ -161,11 +163,12 @@ GET books/_search
} }
} }
} }
```` ```
{% include copy-curl.html %} {% include copy-curl.html %}
### Example response #### Example response
````json
```json
{ {
"took" : 12, "took" : 12,
"timed_out" : false, "timed_out" : false,
@ -220,12 +223,12 @@ GET books/_search
} }
``` ```
## Sort results using painless stored script **Sort results using painless stored script
You can use painless stored script to sort results. You can use painless stored script to sort results.**
### Sample request #### Sample request
````json ```json
GET books/_search GET books/_search
{ {
"query": { "query": {
@ -256,9 +259,9 @@ GET books/_search
} }
``` ```
### Sample response #### Sample response
````json ```json
{ {
"took" : 90, "took" : 90,
"timed_out" : false, "timed_out" : false,
@ -320,4 +323,4 @@ GET books/_search
] ]
} }
} }
``` ```

View File

@ -5,7 +5,9 @@ parent: Script APIs
nav_order: 5 nav_order: 5
--- ---
## Get stored script contexts # Get stored script contexts
**Introduced 1.0**
{: .label .label-purple }
Retrieves all contexts for stored scripts. Retrieves all contexts for stored scripts.
@ -545,7 +547,7 @@ The `GET _script_context` request returns the following fields:
} }
```` ````
### Response fields ## Response fields
The `GET _script_context` request returns the following response fields: The `GET _script_context` request returns the following response fields:

View File

@ -5,7 +5,9 @@ parent: Script APIs
nav_order: 6 nav_order: 6
--- ---
## Get script language # Get script language
**Introduced 1.0**
{: .label .label-purple }
The get script language API operation retrieves all supported script languages and their contexts. The get script language API operation retrieves all supported script languages and their contexts.
@ -87,7 +89,7 @@ The `GET _script_language` request returns the available contexts for each langu
} }
``` ```
### Response fields ## Response fields
The request contains the following response fields. The request contains the following response fields.

View File

@ -5,17 +5,19 @@ parent: Script APIs
nav_order: 3 nav_order: 3
--- ---
## Get stored script # Get stored script
**Introduced 1.0**
{: .label .label-purple }
Retrieves a stored script. Retrieves a stored script.
### Path parameters ## Path parameters
| Parameter | Data type | Description | | Parameter | Data type | Description |
:--- | :--- | :--- :--- | :--- | :---
| script | String | Stored script or search template name. Required.| | script | String | Stored script or search template name. Required.|
### Query parameters ## Query parameters
| Parameter | Data type | Description | | Parameter | Data type | Description |
:--- | :--- | :--- :--- | :--- | :---
@ -51,7 +53,7 @@ The `GET _scripts/my-first-script` request returns the following fields:
} }
```` ````
### Response fields ## Response fields
The `GET _scripts/my-first-script` request returns the following response fields: The `GET _scripts/my-first-script` request returns the following response fields:

View File

@ -8,5 +8,7 @@ redirect_from:
--- ---
# Script APIs # Script APIs
**Introduced 1.0**
{: .label .label-purple }
The script APIs allow you to work with stored scripts. Stored scripts are part of the cluster state and reduce compilation time and enhance search speed. The default scripting language is Painless. The script APIs allow you to work with stored scripts. Stored scripts are part of the cluster state and reduce compilation time and enhance search speed. The default scripting language is Painless.

View File

@ -7,7 +7,7 @@ redirect_from:
--- ---
# Scroll # Scroll
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
You can use the `scroll` operation to retrieve a large number of results. For example, for machine learning jobs, you can request an unlimited number of results in batches. You can use the `scroll` operation to retrieve a large number of results. For example, for machine learning jobs, you can request an unlimited number of results in batches.

View File

@ -7,7 +7,7 @@ redirect_from:
--- ---
# Search # Search
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
The Search API operation lets you execute a search request to search your cluster for data. The Search API operation lets you execute a search request to search your cluster for data.

View File

@ -6,6 +6,8 @@ nav_order: 1
--- ---
# Registering or updating a snapshot repository # Registering or updating a snapshot repository
**Introduced 1.0**
{: .label .label-purple }
You can register a new repository in which to store snapshots or update information for an existing repository by using the snapshots API. You can register a new repository in which to store snapshots or update information for an existing repository by using the snapshots API.
@ -61,7 +63,7 @@ PUT /_snapshot/my-fs-repository
``` ```
{% include copy-curl.html %} {% include copy-curl.html %}
### s3 repository #### s3 repository
Request field | Description Request field | Description
:--- | :--- :--- | :---

View File

@ -5,7 +5,9 @@ parent: Snapshot APIs
nav_order: 5 nav_order: 5
--- ---
## Create snapshot # Create snapshot
**Introduced 1.0**
{: .label .label-purple }
Creates a snapshot within an existing repository. Creates a snapshot within an existing repository.
@ -13,27 +15,27 @@ Creates a snapshot within an existing repository.
* To view a list of your repositories, see [Get snapshot repository]({{site.url}}{{site.baseurl}}/api-reference/snapshots/get-snapshot-repository). * To view a list of your repositories, see [Get snapshot repository]({{site.url}}{{site.baseurl}}/api-reference/snapshots/get-snapshot-repository).
### Path and HTTP methods ## Path and HTTP methods
```json ```json
PUT /_snapshot/<repository>/<snapshot> PUT /_snapshot/<repository>/<snapshot>
POST /_snapshot/<repository>/<snapshot> POST /_snapshot/<repository>/<snapshot>
``` ```
### Path parameters ## Path parameters
Parameter | Data type | Description Parameter | Data type | Description
:--- | :--- | :--- :--- | :--- | :---
repository | String | Repostory name to contain the snapshot. | repository | String | Repostory name to contain the snapshot. |
snapshot | String | Name of Snapshot to create. | snapshot | String | Name of Snapshot to create. |
### Query parameters ## Query parameters
Parameter | Data type | Description Parameter | Data type | Description
:--- | :--- | :--- :--- | :--- | :---
wait_for_completion | Boolean | Whether to wait for snapshot creation to complete before continuing. If you include this parameter, the snapshot definition is returned after completion. | wait_for_completion | Boolean | Whether to wait for snapshot creation to complete before continuing. If you include this parameter, the snapshot definition is returned after completion. |
### Request fields ## Request fields
The request body is optional. The request body is optional.

View File

@ -5,7 +5,9 @@ parent: Snapshot APIs
nav_order: 3 nav_order: 3
--- ---
## Delete snapshot repository configuration # Delete snapshot repository configuration
**Introduced 1.0**
{: .label .label-purple }
Deletes a snapshot repository configuration. Deletes a snapshot repository configuration.
@ -13,7 +15,7 @@ nav_order: 3
To learn more about repositories, see [Register or update snapshot repository]({{site.url}}{{site.baseurl}}/api-reference/snapshots/create-repository). To learn more about repositories, see [Register or update snapshot repository]({{site.url}}{{site.baseurl}}/api-reference/snapshots/create-repository).
### Path parameters ## Path parameters
Parameter | Data type | Description Parameter | Data type | Description
:--- | :--- | :--- :--- | :--- | :---

View File

@ -6,6 +6,8 @@ nav_order: 7
--- ---
## Delete snapshot ## Delete snapshot
**Introduced 1.0**
{: .label .label-purple }
Deletes a snapshot from a repository. Deletes a snapshot from a repository.
@ -15,7 +17,7 @@ Deletes a snapshot from a repository.
* To view a list of your snapshots, see [cat snapshots]({{site.url}}{{site.baseurl}}/api-reference/cat/cat-snapshots). * To view a list of your snapshots, see [cat snapshots]({{site.url}}{{site.baseurl}}/api-reference/cat/cat-snapshots).
### Path parameters ## Path parameters
Parameter | Data type | Description Parameter | Data type | Description
:--- | :--- | :--- :--- | :--- | :---

View File

@ -5,7 +5,9 @@ parent: Snapshot APIs
nav_order: 2 nav_order: 2
--- ---
## Get snapshot repository. # Get snapshot repository.
**Introduced 1.0**
{: .label .label-purple }
Retrieves information about a snapshot repository. Retrieves information about a snapshot repository.
@ -14,13 +16,13 @@ To learn more about repositories, see [Register repository]({{site.url}}{{site.b
You can also get details about a snapshot during and after snapshot creation. See [Get snapshot status]({{site.url}}{{site.baseurl}}/api-reference/snapshots/get-snapshot-status/). You can also get details about a snapshot during and after snapshot creation. See [Get snapshot status]({{site.url}}{{site.baseurl}}/api-reference/snapshots/get-snapshot-status/).
{: .note} {: .note}
### Path parameters ## Path parameters
| Parameter | Data type | Description | | Parameter | Data type | Description |
| :--- | :--- | :--- | | :--- | :--- | :--- |
| repository | String | A comma-separated list of snapshot repository names to retrieve. Wildcard (`*`) expressions are supported including combining wildcards with exclude patterns starting with `-`. | | repository | String | A comma-separated list of snapshot repository names to retrieve. Wildcard (`*`) expressions are supported including combining wildcards with exclude patterns starting with `-`. |
### Query parameters ## Query parameters
| Parameter | Data type | Description | | Parameter | Data type | Description |
:--- | :--- | :--- :--- | :--- | :---
@ -52,7 +54,7 @@ Upon success, the response returns repositry information. This sample is for an
} }
```` ````
### Response fields ## Response fields
| Field | Data type | Description | | Field | Data type | Description |
| :--- | :--- | :--- | | :--- | :--- | :--- |

View File

@ -5,7 +5,9 @@ parent: Snapshot APIs
nav_order: 8 nav_order: 8
--- ---
## Get snapshot status # Get snapshot status
**Introduced 1.0**
{: .label .label-purple }
Returns details about a snapshots state during and after snapshot creation. Returns details about a snapshots state during and after snapshot creation.
@ -14,7 +16,7 @@ To learn about snapshot creation, see [Create snapshot]({{site.url}}{{site.baseu
If you use the Security plugin, you must have the `monitor_snapshot`, `create_snapshot`, or `manage cluster` privileges. If you use the Security plugin, you must have the `monitor_snapshot`, `create_snapshot`, or `manage cluster` privileges.
{: .note} {: .note}
### Path parameters ## Path parameters
Path parameters are optional. Path parameters are optional.
@ -34,7 +36,7 @@ Three request variants provide flexibility:
Using the API to return state for other than currently running snapshots can be very costly for (1) machine machine resources and (2) processing time if running in the cloud. For each snapshot, each request causes file reads from all a snapshot's shards. Using the API to return state for other than currently running snapshots can be very costly for (1) machine machine resources and (2) processing time if running in the cloud. For each snapshot, each request causes file reads from all a snapshot's shards.
{: .warning} {: .warning}
### Request fields ## Request fields
| Field | Data type | Description | | Field | Data type | Description |
:--- | :--- | :--- :--- | :--- | :---
@ -367,7 +369,7 @@ The `GET _snapshot/my-opensearch-repo/my-first-snapshot/_status` request returns
} }
```` ````
### Response fields ## Response fields
| Field | Data type | Description | | Field | Data type | Description |
:--- | :--- | :--- :--- | :--- | :---

View File

@ -5,18 +5,20 @@ parent: Snapshot APIs
nav_order: 6 nav_order: 6
--- ---
## Get snapshot. # Get snapshot.
**Introduced 1.0**
{: .label .label-purple }
Retrieves information about a snapshot. Retrieves information about a snapshot.
### Path parameters ## Path parameters
| Parameter | Data type | Description | | Parameter | Data type | Description |
| :--- | :--- | :--- | | :--- | :--- | :--- |
| repository | String | The repository that contains the snapshot to retrieve. | | repository | String | The repository that contains the snapshot to retrieve. |
| snapshot | String | Snapshot to retrieve. | snapshot | String | Snapshot to retrieve.
### Query parameters ## Query parameters
| Parameter | Data type | Description | | Parameter | Data type | Description |
:--- | :--- | :--- :--- | :--- | :---
@ -71,7 +73,7 @@ Upon success, the response returns snapshot information:
] ]
} }
```` ````
### Response fields ## Response fields
| Field | Data type | Description | | Field | Data type | Description |
| :--- | :--- | :--- | | :--- | :--- | :--- |

View File

@ -9,5 +9,7 @@ redirect_from:
--- ---
# Snapshot APIs # Snapshot APIs
**Introduced 1.0**
{: .label .label-purple }
The snapshot APIs allow you to manage snapshots and snapshot repositories. The snapshot APIs allow you to manage snapshots and snapshot repositories.

View File

@ -6,7 +6,9 @@ parent: Snapshot APIs
nav_order: 9 nav_order: 9
--- ---
## Restore Snapshot # Restore Snapshot
**Introduced 1.0**
{: .label .label-purple }
Restores a snapshot of a cluster or specified data streams and indices. Restores a snapshot of a cluster or specified data streams and indices.
@ -17,14 +19,14 @@ Restores a snapshot of a cluster or specified data streams and indices.
If open indexes with the same name that you want to restore already exist in the cluster, you must close, delete, or rename the indexes. See [Example request](#example-request) for information about renaming an index. See [Close index]({{site.url}}{{site.baseurl}}/api-reference/index-apis/close-index) for information about closing an index. If open indexes with the same name that you want to restore already exist in the cluster, you must close, delete, or rename the indexes. See [Example request](#example-request) for information about renaming an index. See [Close index]({{site.url}}{{site.baseurl}}/api-reference/index-apis/close-index) for information about closing an index.
{: .note} {: .note}
### Path parameters ## Path parameters
| Parameter | Data type | Description | | Parameter | Data type | Description |
:--- | :--- | :--- :--- | :--- | :---
repository | String | Repository containing the snapshot to restore. | repository | String | Repository containing the snapshot to restore. |
| snapshot | String | Snapshot to restore. | | snapshot | String | Snapshot to restore. |
### Query parameters ## Query parameters
Parameter | Data type | Description Parameter | Data type | Description
:--- | :--- | :--- :--- | :--- | :---
@ -90,7 +92,7 @@ Upon success, the response returns the following JSON object:
```` ````
Except for the snapshot name, all properties are empty or `0`. This is because any changes made to the volume after the snapshot was generated are lost. However, if you invoke the [Get snapshot]({{site.url}}{{site.baseurl}}/api-reference/snapshots/get-snapshot) API to examine the snapshot, a fully populated snapshot object is returned. Except for the snapshot name, all properties are empty or `0`. This is because any changes made to the volume after the snapshot was generated are lost. However, if you invoke the [Get snapshot]({{site.url}}{{site.baseurl}}/api-reference/snapshots/get-snapshot) API to examine the snapshot, a fully populated snapshot object is returned.
### Response fields ## Response fields
| Field | Data type | Description | | Field | Data type | Description |
| :--- | :--- | :--- | | :--- | :--- | :--- |

View File

@ -6,7 +6,9 @@ parent: Snapshot APIs
nav_order: 4 nav_order: 4
--- ---
## Verify snapshot repository # Verify snapshot repository
**Introduced 1.0**
{: .label .label-purple }
Verifies that a snapshot repository is functional. Verifies the repository on each node in a cluster. Verifies that a snapshot repository is functional. Verifies the repository on each node in a cluster.
@ -15,7 +17,7 @@ If verification is successful, the verify snapshot repository API returns a list
If you use the Security plugin, you must have the `manage cluster` privilege. If you use the Security plugin, you must have the `manage cluster` privilege.
{: .note} {: .note}
### Path parameters ## Path parameters
Path parameters are optional. Path parameters are optional.
@ -23,7 +25,7 @@ Path parameters are optional.
:--- | :--- | :--- :--- | :--- | :---
| repository | String | Name of repository to verify. | | repository | String | Name of repository to verify. |
### Query parameters ## Query parameters
| Parameter | Data type | Description | | Parameter | Data type | Description |
:--- | :--- | :--- :--- | :--- | :---
@ -68,7 +70,7 @@ In the preceding sample, one node is connected to the snapshot repository. If mo
} }
```` ````
### Response fields ## Response fields
| Field | Data type | Description | | Field | Data type | Description |
:--- | :--- | :--- :--- | :--- | :---

View File

@ -7,7 +7,7 @@ redirect_from:
--- ---
# Tasks # Tasks
Introduced 1.0 **Introduced 1.0**
{: .label .label-purple } {: .label .label-purple }
A task is any operation you run in a cluster. For example, searching your data collection of books for a title or author name is a task. When you run OpenSearch, a task is automatically created to monitor your cluster's health and performance. For more information about all of the tasks currently executing in your cluster, you can use the `tasks` API operation. A task is any operation you run in a cluster. For example, searching your data collection of books for a title or author name is a task. When you run OpenSearch, a task is automatically created to monitor your cluster's health and performance. For more information about all of the tasks currently executing in your cluster, you can use the `tasks` API operation.

View File

@ -7,6 +7,8 @@ redirect_from:
--- ---
# Supported units # Supported units
**Introduced 1.0**
{: .label .label-purple }
OpenSearch supports the following units for all REST operations: OpenSearch supports the following units for all REST operations:

View File

@ -8,6 +8,8 @@ redirect_from:
--- ---
# Create pipeline # Create pipeline
**Introduced 1.0**
{: .label .label-purple }
Use the create pipeline API operation to create or update pipelines in OpenSearch. Note that the pipeline requires you to define at least one processor that specifies how to change the documents. Use the create pipeline API operation to create or update pipelines in OpenSearch. Note that the pipeline requires you to define at least one processor that specifies how to change the documents.

View File

@ -8,6 +8,8 @@ redirect_from:
--- ---
# Delete pipeline # Delete pipeline
**Introduced 1.0**
{: .label .label-purple }
Use the following request to delete a pipeline. Use the following request to delete a pipeline.

View File

@ -8,6 +8,8 @@ redirect_from:
--- ---
# Get pipeline # Get pipeline
**Introduced 1.0**
{: .label .label-purple }
Use the get ingest pipeline API operation to retrieve all the information about the pipeline. Use the get ingest pipeline API operation to retrieve all the information about the pipeline.

View File

@ -8,6 +8,8 @@ redirect_from:
--- ---
# Ingest pipelines # Ingest pipelines
**Introduced 1.0**
{: .label .label-purple }
An _ingest pipeline_ is a sequence of _processors_ that are applied to documents as they are ingested into an index. Each [processor]({{site.url}}{{site.baseurl}}/ingest-pipelines/processors/index-processors/) in a pipeline performs a specific task, such as filtering, transforming, or enriching data. An _ingest pipeline_ is a sequence of _processors_ that are applied to documents as they are ingested into an index. Each [processor]({{site.url}}{{site.baseurl}}/ingest-pipelines/processors/index-processors/) in a pipeline performs a specific task, such as filtering, transforming, or enriching data.
@ -34,7 +36,7 @@ A _pipeline definition_ describes the sequence of an ingest pipeline and can be
} }
``` ```
### Request body fields #### Request body fields
Field | Required | Type | Description Field | Required | Type | Description
:--- | :--- | :--- | :--- :--- | :--- | :--- | :---

View File

@ -7,6 +7,8 @@ redirect_from:
--- ---
# Handling pipeline failures # Handling pipeline failures
**Introduced 1.0**
{: .label .label-purple }
Each ingest pipeline consists of a series of processors that are applied to the documents in sequence. If a processor fails, the entire pipeline will fail. You have two options for handling failures: Each ingest pipeline consists of a series of processors that are applied to the documents in sequence. If a processor fails, the entire pipeline will fail. You have two options for handling failures:

View File

@ -8,12 +8,15 @@ redirect_from:
--- ---
# Append # Append
**Introduced 1.0**
{: .label .label-purple }
The `append` processor is used to add values to a field: The `append` processor is used to add values to a field:
- If the field is an array, the `append` processor appends the specified values to that array. - If the field is an array, the `append` processor appends the specified values to that array.
- If the field is a scalar field, the `append` processor converts it to an array and appends the specified values to that array. - If the field is a scalar field, the `append` processor converts it to an array and appends the specified values to that array.
- If the field does not exist, the `append` processor creates an array with the specified values. - If the field does not exist, the `append` processor creates an array with the specified values.
### Example
The following is the syntax for the `append` processor: The following is the syntax for the `append` processor:
```json ```json

Some files were not shown because too many files have changed in this diff Show More