Skip to content

Commit

Permalink
Clear cache API - additional edits (#1214)
Browse files Browse the repository at this point in the history
* to check in the cache API for Steve

Signed-off-by: alicejw <alicejw@amazon.com>

* for editorial review feedback modifications

Signed-off-by: alicejw <alicejw@amazon.com>

* doc review update

Signed-off-by: alicejw <alicejw@amazon.com>

Signed-off-by: alicejw <alicejw@amazon.com>
  • Loading branch information
alicejw1 authored and Naarcha-AWS committed Oct 6, 2022
1 parent 04796b8 commit b1460c3
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions _opensearch/rest-api/index-apis/clear-index-cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,38 @@ nav_order: 320

## Clear index or data stream cache

Clears the caches of one or more indexes. For data streams, the API clears the caches of the stream’s 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 stream’s backing indexes.


If you use the security plugin, you must have the `manage index` privileges.
{: .note}

### Path parameters

| Parameter | Data Type | Description |
| Parameter | Data Type | Description |
:--- | :--- | :---
| target | String | Comma-delimited list of data streams, indexes, and index aliases to apply cache clearing. Wildcard expressions (`*`) are supported. To target all data streams and indexes in a cluster, omit this parameter or use `_all` or `*`. Optional. |
| target | String | Comma-delimited list of data streams, indexes, and index aliases to which cache clearing will be applied. Wildcard expressions (`*`) are supported. To target all data streams and indexes in a cluster, omit this parameter or use `_all` or `*`. Optional. |


### Query parameters

All query parameters are optional.

| Parameter | Data Type | Description |
| Parameter | Data Type | Description |
:--- | :--- | :---
| allow_no_indices | Boolean | Whether to ignore wildcards, index aliases, or `_all` target (`target` path parameter) values that don’t match any indexes. If `false`, the request returns an error if any wildcard expression, index alias, or `_all` target values don't match any indexes. This behavior also applies if the request targets include other open indexes. For example, a request where the target is `fig*,app*` returns an error if an index starts with `fig` but no index starts with `app`. Defaults to `true`. |
| expand_wildcards | String | Determines the index types that wildcard expressions can expand to. Accepts multiple values separated by a comma, such as `open,hidden`. Valid values are: <br /><br /> `all` - Expand to open, closed, and hidden indexes.<br /><br />`open` - Expand only to open indexes.<br /><br />`closed` - Expand only to close indexes<br /><br />`hidden` - Expand to include hidden indexes. Must be combined with `open`, `closed`, or `both`.<br /><br />`none` - Expansions are not accepted.<br /><br /> Defaults to `open`. |
| allow_no_indices | Boolean | Whether to ignore wildcards, index aliases, or `_all` target (`target` path parameter) values that don’t match any indexes. If `false`, the request returns an error if any wildcard expression, index alias, or `_all` target value doesn't match any indexes. This behavior also applies if the request targets include other open indexes. For example, a request where the target is `fig*,app*` returns an error if an index starts with `fig` but no index starts with `app`. Defaults to `true`. |
| expand_wildcards | String | Determines the index types that wildcard expressions can expand to. Accepts multiple values separated by a comma, such as `open,hidden`. Valid values are: <br /><br /> `all` -- Expand to open, closed, and hidden indexes.<br /><br />`open` -- Expand only to open indexes.<br /><br />`closed` -- Expand only to closed indexes<br /><br />`hidden` -- Expand to include hidden indexes. Must be combined with `open`, `closed`, or `both`.<br /><br />`none` -- Expansions are not accepted.<br /><br /> Defaults to `open`. |
| fielddata | Boolean | If `true`, clears the fields cache. Use the `fields` parameter to clear specific fields' caches. Defaults to `true`. |
| fields | String | Used in conjunction with the `fielddata` parameter. Comma-delimited list of field names to clear cache. Does not support objects or field aliases. Defaults to all fields. |
| index | String | Comma-delimited list of index names to clear cache. |
| fields | String | Used in conjunction with the `fielddata` parameter. Comma-delimited list of field names that will be cleared out of the cache. Does not support objects or field aliases. Defaults to all fields. |
| index | String | Comma-delimited list of index names that will be cleared out of the cache. |
| ignore_unavailable | Boolean | If `true`, OpenSearch ignores missing or closed indexes. Defaults to `false`. |
| query | Boolean | If `true`, clears the query cache. Defaults to `true`. |
| request | Boolean | If `true`, clears the request cache. Defaults to `true`. |

#### Sample requests

The following sample requests show multiple clear cache API uses.

##### Clear a specific cache

The following request clears the fields cache only:
Expand Down

0 comments on commit b1460c3

Please sign in to comment.