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 Index Stats API #4892

Merged
merged 7 commits into from
Aug 28, 2023
Merged

Add Index Stats API #4892

merged 7 commits into from
Aug 28, 2023

Conversation

kolchfa-aws
Copy link
Collaborator

Add Index Stats API

Checklist

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

Signed-off-by: Fanit Kolchina <[email protected]>
@kolchfa-aws kolchfa-aws self-assigned this Aug 25, 2023
@kolchfa-aws kolchfa-aws added backport 1.3 PR: Backport label for v1.3.x backport 2.9 PR: Backport label for 2.9 labels Aug 25, 2023
@hdhalter
Copy link
Contributor

@kolchfa-aws - Is there an issue associated with this or is this the one that is tied to a 2.10 feature?

@kolchfa-aws
Copy link
Collaborator Author

It's one of the missing APIs.

Signed-off-by: Fanit Kolchina <[email protected]>
Copy link
Collaborator

@natebower natebower left a 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!

_api-reference/index-apis/stats.md Outdated Show resolved Hide resolved
nav_order: 72
---

# Index stats
Copy link
Collaborator

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?

Copy link
Collaborator Author

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 Show resolved Hide resolved
:--- |:----
`_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.
Copy link
Collaborator

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..."?

`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.
Copy link
Collaborator

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 Show resolved Hide resolved
`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`.
Copy link
Collaborator

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.


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`.
Copy link
Collaborator

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">
Copy link
Collaborator

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?

Copy link
Collaborator Author

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]>
kolchfa-aws and others added 3 commits August 28, 2023 15:00
@kolchfa-aws kolchfa-aws merged commit 871f8ab into main Aug 28, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 28, 2023
* 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>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 28, 2023
* 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>
kolchfa-aws pushed a commit that referenced this pull request Aug 28, 2023
* 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]>
kolchfa-aws pushed a commit that referenced this pull request Aug 28, 2023
* 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]>
sheltie-fusafusa pushed a commit to sheltie-fusafusa/documentation-website that referenced this pull request Aug 28, 2023
* 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]>
sheltie-fusafusa pushed a commit to sheltie-fusafusa/documentation-website that referenced this pull request Aug 28, 2023
* 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]>
harshavamsi pushed a commit to harshavamsi/documentation-website that referenced this pull request Oct 31, 2023
* 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]>
vagimeli pushed a commit that referenced this pull request Dec 21, 2023
* 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]>
@kolchfa-aws kolchfa-aws deleted the index-stats-api branch March 28, 2024 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.3 PR: Backport label for v1.3.x backport 2.9 PR: Backport label for 2.9
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants