-
Notifications
You must be signed in to change notification settings - Fork 490
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 Index Stats API #4892
Add Index Stats API #4892
Conversation
Signed-off-by: Fanit Kolchina <[email protected]>
@kolchfa-aws - Is there an issue associated with this or is this the one that is tied to a 2.10 feature? |
It's one of the missing APIs. |
Signed-off-by: Fanit Kolchina <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kolchfa-aws Please see my comments and changes and let me know if you have any questions. Thanks!
nav_order: 72 | ||
--- | ||
|
||
# Index stats |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should "Stats" be capitalized here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't capitalize API names in other pages. I'll keep as is for consistency and I'll put in an issue to change capitalization on all APIs.
_api-reference/index-apis/stats.md
Outdated
:--- |:---- | ||
`_all` | Return all statistics. | ||
`completion` | Completion suggester statistics. | ||
`docs` | Returns the number of documents and the number of deleted docs that have not yet been merged. Index refresh operations can affect this statistic. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Returns the total number of documents and the number of deleted documents..."?
_api-reference/index-apis/stats.md
Outdated
`refresh` | Refresh statistics. | ||
`request_cache` | Shard request cache statistics. | ||
`search` | Search statistics, including suggest operation statistics. Search operations can be associated with one or more groups. You can include statistics for custom groups by providing a `groups` parameter, which accepts a comma-separated list of group names. To return statistics for all groups, use `_all`. | ||
`segments` | Statistics about memory use of all open segments. If the `include_segment_file_sizes parameter` is `true`, this metric includes the aggregated disk usage of each Lucene index file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is "parameter" supposed to be inside the code font?
_api-reference/index-apis/stats.md
Outdated
`fielddata_fields` | String | A comma-separated list or wildcard expression specifying fields to include in field-level `fielddata` statistics. | ||
`forbid_closed_indices` | Boolean | Specifies not to collect statistics for closed indexes. Default is `true`. | ||
`groups` | String | A comma-separated list of search groups to include in the `search` statistics. | ||
`level` | String | Specifies the level to aggregate statistics. Valid values are: <br> - `cluster`: Cluster-level statistics, `indices`: Index-level statistics <br> - `shards`: Shard-level statistics. <br> Default is `indices`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"the level used to aggregate"? Also, should indices
be its own bullet point? And they should all end with a period.
_api-reference/index-apis/stats.md
Outdated
|
||
Parameter | Data type | Description | ||
:--- | :--- | :--- | ||
`expand_wildcards` | String | Specifies the type of indexes to which wildcard expressions can expand. Supports comma-separated values. Valid values are: <br> - `all`: Expand to all open and closed indexes, including hidden indexes <br> `open`: Expand to open indexes <br> - `closed`: Expand to closed indexes <br> - `hidden`: Include hidden indexes when expanding. Must be combined with `open`, `closed`, or both <br> - `none`: Do not accept wildcard expressions <br> Default is `open`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's put periods at the end of each L2 bullet.
|
||
By default, the returned statistics are aggregated in the `primaries` and `total` aggregations. The `primaries` aggregation contains statistics for the primary shards. The `total` aggregation contains statistics for both primary and replica shards. | ||
|
||
<details closed markdown="block"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be introduced by a brief sentence ending in a colon?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In our template, we don't have an introductory sentence. I'll add one here though because it has more info.
Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: kolchfa-aws <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>
Signed-off-by: Fanit Kolchina <[email protected]>
Signed-off-by: Fanit Kolchina <[email protected]>
* Add Index Stats API Signed-off-by: Fanit Kolchina <[email protected]> * Reword for clarity Signed-off-by: Fanit Kolchina <[email protected]> * Apply suggestions from code review Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: kolchfa-aws <[email protected]> * Update _api-reference/index-apis/stats.md Signed-off-by: kolchfa-aws <[email protected]> * Implemented editorial comments Signed-off-by: Fanit Kolchina <[email protected]> * Implement editorial comments Signed-off-by: Fanit Kolchina <[email protected]> --------- Signed-off-by: Fanit Kolchina <[email protected]> Signed-off-by: kolchfa-aws <[email protected]> Co-authored-by: Nathan Bower <[email protected]> (cherry picked from commit 871f8ab) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add Index Stats API Signed-off-by: Fanit Kolchina <[email protected]> * Reword for clarity Signed-off-by: Fanit Kolchina <[email protected]> * Apply suggestions from code review Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: kolchfa-aws <[email protected]> * Update _api-reference/index-apis/stats.md Signed-off-by: kolchfa-aws <[email protected]> * Implemented editorial comments Signed-off-by: Fanit Kolchina <[email protected]> * Implement editorial comments Signed-off-by: Fanit Kolchina <[email protected]> --------- Signed-off-by: Fanit Kolchina <[email protected]> Signed-off-by: kolchfa-aws <[email protected]> Co-authored-by: Nathan Bower <[email protected]> (cherry picked from commit 871f8ab) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add Index Stats API * Reword for clarity * Apply suggestions from code review * Update _api-reference/index-apis/stats.md * Implemented editorial comments * Implement editorial comments --------- (cherry picked from commit 871f8ab) Signed-off-by: Fanit Kolchina <[email protected]> Signed-off-by: kolchfa-aws <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Nathan Bower <[email protected]>
* Add Index Stats API * Reword for clarity * Apply suggestions from code review * Update _api-reference/index-apis/stats.md * Implemented editorial comments * Implement editorial comments --------- (cherry picked from commit 871f8ab) Signed-off-by: Fanit Kolchina <[email protected]> Signed-off-by: kolchfa-aws <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Nathan Bower <[email protected]>
* Add Index Stats API Signed-off-by: Fanit Kolchina <[email protected]> * Reword for clarity Signed-off-by: Fanit Kolchina <[email protected]> * Apply suggestions from code review Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: kolchfa-aws <[email protected]> * Update _api-reference/index-apis/stats.md Signed-off-by: kolchfa-aws <[email protected]> * Implemented editorial comments Signed-off-by: Fanit Kolchina <[email protected]> * Implement editorial comments Signed-off-by: Fanit Kolchina <[email protected]> --------- Signed-off-by: Fanit Kolchina <[email protected]> Signed-off-by: kolchfa-aws <[email protected]> Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: sheltie <[email protected]>
* Add Index Stats API Signed-off-by: Fanit Kolchina <[email protected]> * Reword for clarity Signed-off-by: Fanit Kolchina <[email protected]> * Apply suggestions from code review Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: kolchfa-aws <[email protected]> * Update _api-reference/index-apis/stats.md Signed-off-by: kolchfa-aws <[email protected]> * Implemented editorial comments Signed-off-by: Fanit Kolchina <[email protected]> * Implement editorial comments Signed-off-by: Fanit Kolchina <[email protected]> --------- Signed-off-by: Fanit Kolchina <[email protected]> Signed-off-by: kolchfa-aws <[email protected]> Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: sheltie <[email protected]>
* Add Index Stats API Signed-off-by: Fanit Kolchina <[email protected]> * Reword for clarity Signed-off-by: Fanit Kolchina <[email protected]> * Apply suggestions from code review Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: kolchfa-aws <[email protected]> * Update _api-reference/index-apis/stats.md Signed-off-by: kolchfa-aws <[email protected]> * Implemented editorial comments Signed-off-by: Fanit Kolchina <[email protected]> * Implement editorial comments Signed-off-by: Fanit Kolchina <[email protected]> --------- Signed-off-by: Fanit Kolchina <[email protected]> Signed-off-by: kolchfa-aws <[email protected]> Co-authored-by: Nathan Bower <[email protected]>
* Add Index Stats API Signed-off-by: Fanit Kolchina <[email protected]> * Reword for clarity Signed-off-by: Fanit Kolchina <[email protected]> * Apply suggestions from code review Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: kolchfa-aws <[email protected]> * Update _api-reference/index-apis/stats.md Signed-off-by: kolchfa-aws <[email protected]> * Implemented editorial comments Signed-off-by: Fanit Kolchina <[email protected]> * Implement editorial comments Signed-off-by: Fanit Kolchina <[email protected]> --------- Signed-off-by: Fanit Kolchina <[email protected]> Signed-off-by: kolchfa-aws <[email protected]> Co-authored-by: Nathan Bower <[email protected]>
Add Index Stats API
Checklist
For more information on following Developer Certificate of Origin and signing off your commits, please check here.