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 a new column for docs.total in CAT indices API #76856

Open
ppf2 opened this issue Aug 23, 2021 · 1 comment
Open

Add a new column for docs.total in CAT indices API #76856

ppf2 opened this issue Aug 23, 2021 · 1 comment
Labels
:Data Management/CAT APIs Text APIs behind /_cat >enhancement Team:Data Management Meta label for data/management team

Comments

@ppf2
Copy link
Member

ppf2 commented Aug 23, 2021

Currently, we have two columns for doc counts in /_cat/indices API:

docs.count
docs.deleted

It can be confusing to the end users (esp. those who deal with frequent updates) because docs.counts does not represent the total number of documents in the index. It only represents the "live" documents. docs.deleted represents the "dead" documents that are deleted and waiting to be purged (still occupy disk storage).

So to calculate the % of deleted docs in an index, the user will have to use docs.deleted/(docs.deleted+docs.count).

Have we considered adding a new column (but not display it by default so that it will not be a breaking change).

docs.total (total)
docs.count (live)
docs.deleted (deleted)

For users who only care about the "live" documents, they will certainly be fine to continue to use docs.count.

@ppf2 ppf2 added >enhancement :Data Management/CAT APIs Text APIs behind /_cat needs:triage Requires assignment of a team area label labels Aug 23, 2021
@elasticmachine elasticmachine added the Team:Data Management Meta label for data/management team label Aug 23, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (Team:Core/Features)

@probakowski probakowski removed the needs:triage Requires assignment of a team area label label Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/CAT APIs Text APIs behind /_cat >enhancement Team:Data Management Meta label for data/management team
Projects
None yet
Development

No branches or pull requests

3 participants