Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the two clear cache APIs. #1093

Closed

Conversation

Steve-O-Murphy
Copy link
Contributor

Signed-off-by: Steve Murphy stevemurphy@BCSR-11413.local

Description

Added the POST /<target>/_cache/clear and POST /_cache/clear APIs. Both are in one file.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Steve Murphy <stevemurphy@BCSR-11413.local>
@hdhalter
Copy link
Contributor

hdhalter commented Sep 2, 2022

@Steve-O-Murphy -Is this ready for review?

@Steve-O-Murphy
Copy link
Contributor Author

@hdhalter Yes, it is.

@hdhalter hdhalter added the 4 - Doc review PR: Doc review in progress label Sep 9, 2022
| 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 indices. If `false`, the request returns an error if any wildcard expression, index alias, or `_all` target values don't match any indices. This behavior also applies if the request targets include other open indices. 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 indices.<br /><br />open - Expand only to open indices.<br /><br />closed - Expand only to close indices<br /><br />hidden - Expand to include hidden indices. Must be combined with `open`, `closed`, or `both`.<br /><br />none - Expansions are not accepted.<br /><br /> Defaults to `open`. |
Copy link
Contributor

@alicejw1 alicejw1 Sep 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| 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 indices.<br /><br />open - Expand only to open indices.<br /><br />closed - Expand only to close indices<br /><br />hidden - Expand to include hidden indices. Must be combined with `open`, `closed`, or `both`.<br /><br />none - Expansions are not accepted.<br /><br /> Defaults to `open`. |
| 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 indices.<br /><br />`open` - Expand only to open indices.<br /><br />`closed` - Expand only to close indices<br /><br />`hidden` - Expand to include hidden indices. Must be combined with `open`, `closed`, or `both`.<br /><br />`none` - Expansions are not accepted.<br /><br /> Defaults to `open`. |

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest to add code font to all values

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have made the changes.

````

##### Clear caches for all data streams and indices

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(add the descriptive sentence)

"The following request clears the cache for all data streams and indexes:"

````

##### Clear caches for specific data streams and indices

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(add the descriptive sentence)

"The following request clears the cache for two specific indexes:"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the descriptive sentence and made it slightly more specific:

The following request clears caches and data streams for my-index and my-index2:

Copy link
Contributor

@alicejw1 alicejw1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!
One general comment to replace text (non-code elements) throughout from "indices" to "indexes" as it was decided collectively to go with that term.

Signed-off-by: Steve Murphy <stevemurphy@BCSR-11413.local>
@Steve-O-Murphy
Copy link
Contributor Author

Thanks for the great comments, @alicejw-aws!

@Steve-O-Murphy
Copy link
Contributor Author

@alicejw-aws and @hdhalter I've pushed changes to the repo.

@Naarcha-AWS
Copy link
Collaborator

Thanks for your help Steve! Alice made additional changes in a different PR. Closing this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - Doc review PR: Doc review in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants