Addressed comments

This commit is contained in:
keithhc2 2021-08-12 11:41:04 -07:00
parent eb51f06694
commit dbb3d893ac
2 changed files with 10 additions and 10 deletions

View File

@ -7,7 +7,6 @@ nav_order: 25
--- ---
# Delete by query # Delete by query
Introduced 1.0 Introduced 1.0
{: .label .label-purple} {: .label .label-purple}
@ -17,7 +16,6 @@ You can include a query as part of your delete request so OpenSearch deletes all
```json ```json
POST sample-index1/_delete_by_query POST sample-index1/_delete_by_query
{ {
"query": { "query": {
"match": { "match": {
@ -39,7 +37,7 @@ All URL parameters are optional.
Parameter | Type | Description Parameter | Type | Description
:--- | :--- | :--- | :--- :--- | :--- | :--- | :---
<index> | String | Name of the data streams, indices, or aliases to delete from. Supports wildcards. If left blank, OpenSearch searches through all indices. <index> | String | Name of the data streams, indices, or aliases to delete from. Supports wildcards. If left blank, OpenSearch searches all indices.
allow_no_indices | Boolean | False indicates to OpenSearch the request should return an error if any wildcard expression or index alias targets only missing or closed indices. Default is true. allow_no_indices | Boolean | False indicates to OpenSearch the request should return an error if any wildcard expression or index alias targets only missing or closed indices. Default is true.
analyzer | String | The analyzer to use in the query string. analyzer | String | The analyzer to use in the query string.
analyze_wildcard | Boolean | Specifies whether to analyze wildcard and prefix queries. Default is false. analyze_wildcard | Boolean | Specifies whether to analyze wildcard and prefix queries. Default is false.
@ -57,7 +55,7 @@ request_cache | Boolean | Specifies whether OpenSearch should use the request ca
refresh | Boolean | Specifies whether OpenSearch should refresh all of the shards involved in the delete request once the operation finishes. Default is false. refresh | Boolean | Specifies whether OpenSearch should refresh all of the shards involved in the delete request once the operation finishes. Default is false.
requests_per_second | Integer | Specifies the request's throttling in sub-requests per second. Default is -1, which means no throttling. requests_per_second | Integer | Specifies the request's throttling in sub-requests per second. Default is -1, which means no throttling.
routing | String | Value used to route the operation to a specific shard. routing | String | Value used to route the operation to a specific shard.
scroll | Time | Amount of time to keep the search results of documents that matched the query. scroll | Time | Amount of time the search context should be open.
scroll_size | Integer | Size of the scroll request of the operation. Default is 1000. scroll_size | Integer | Size of the scroll request of the operation. Default is 1000.
search_type | String | Whether OpenSearch should use global term and document frequencies calculating revelance scores. Valid choices are `query_then_fetch` and `dfs_query_then_fetch`. `query_then_fetch` scores documents using local term and document frequencies for the shard. Its usually faster but less accurate. `dfs_query_then_fetch` scores documents using global term and document frequencies across all shards. Its usually slower but more accurate. Default is `query_then_fetch`. search_type | String | Whether OpenSearch should use global term and document frequencies calculating revelance scores. Valid choices are `query_then_fetch` and `dfs_query_then_fetch`. `query_then_fetch` scores documents using local term and document frequencies for the shard. Its usually faster but less accurate. `dfs_query_then_fetch` scores documents using global term and document frequencies across all shards. Its usually slower but more accurate. Default is `query_then_fetch`.
search_timeout | Time | Amount of time until timeout for the search request. Default is no timeout. search_timeout | Time | Amount of time until timeout for the search request. Default is no timeout.
@ -70,7 +68,7 @@ stats | String | Value to associate with the request for additional logging.
terminate_after | Integer | The maximum number of documents OpenSearch should process before terminating the request. terminate_after | Integer | The maximum number of documents OpenSearch should process before terminating the request.
timeout | Time | How long the operation should wait from a response from active shards. Default is `1m`. timeout | Time | How long the operation should wait from a response from active shards. Default is `1m`.
version | Boolean | Whether to include the document version as a match. version | Boolean | Whether to include the document version as a match.
wait_for_active_shards | Integer | The number of shards that must be active before OpenSearch executes the operation. Valid values are `all` or any integer up to the total number of shards in the index. Default is 1, which is the primary shard. wait_for_active_shards | String | The number of shards that must be active before OpenSearch executes the operation. Valid values are `all` or any integer up to the total number of shards in the index. Default is 1, which is the primary shard.
## Request body ## Request body

View File

@ -7,16 +7,18 @@ nav_order: 1
--- ---
# 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 a document by indexing it. Before you can search for data, you must first add documents. This operation adds a single document to your index.
## Example ## Example
```json ```json
GET sample-index/_doc/1 PUT sample-index/_doc/1
{
"Description": "To be or not to be, that is the question."
}
``` ```
## Path and HTTP methods ## Path and HTTP methods
@ -36,7 +38,7 @@ In your request, you must specify the index you want to add your document to. If
Parameter | Type | Description | Required Parameter | Type | Description | Required
:--- | :--- | :--- | :--- :--- | :--- | :--- | :---
<index> | String | Name of the index. | Yes <index> | String | Name of the index. | Yes
&lt;_id&gt; | String | A unique identifier to attach to the document. To automatically generate an ID, use `POST <target/_doc` in your request. | No &lt;_id&gt; | String | A unique identifier to attach to the document. To automatically generate an ID, use `POST <target>/doc` in your request instead of PUT. | No
if_seq_no | Integer | Only perform the operation if the document has the specified sequence number. | No if_seq_no | Integer | Only perform the operation if the document has the specified sequence number. | No
if_primary_term | Integer | Only perform the operation if the document has the specified primary term. | No if_primary_term | Integer | Only perform the operation if the document has the specified primary term. | No
op_type | Enum | Specifies the type of operation to complete with the document. Valid values are `create` (create the index if it doesn't exist) and `index`. If a document ID is included in the request, then the default is `index`. Otherwise, the default is `create`. | No op_type | Enum | Specifies the type of operation to complete with the document. Valid values are `create` (create the index if it doesn't exist) and `index`. If a document ID is included in the request, then the default is `index`. Otherwise, the default is `create`. | No
@ -45,7 +47,7 @@ routing | String | Value used to assign operations to specific shards. | No
timeout | Time | How long to wait for a response from the cluster. Default is `1m`. | No timeout | Time | How long to wait for a response from the cluster. Default is `1m`. | No
version | Integer | The document's version number. | No version | Integer | The document's version number. | No
version_type | Enum | Assigns a specific type to the document. Valid options are `external` (retrieve the document if the specified version number is greater than the document's current version) and `external_gte` (retrieve the document if the specified version number is greater than or equal to the document's current version). For example, to index version 3 of a document, use `/_doc/1?version=3&version_type=external`. | No version_type | Enum | Assigns a specific type to the document. Valid options are `external` (retrieve the document if the specified version number is greater than the document's current version) and `external_gte` (retrieve the document if the specified version number is greater than or equal to the document's current version). For example, to index version 3 of a document, use `/_doc/1?version=3&version_type=external`. | No
wait_for_active_shards | 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. | No 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. | No
require_alias | Boolean | Specifies whether the target index must be an index alias. Default is false. | No require_alias | Boolean | Specifies whether the target index must be an index alias. Default is false. | No
## Request body ## Request body