Migrate Index Management away from using the cat APIs #57286
Labels
enhancement
New value added to drive a business result
Feature:Index Management
Index and index templates UI
Team:Kibana Management
Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more
Per elastic/elasticsearch#51772, cat APIs are not intended for consumption by applications. Index Management currently uses
_cat/aliases
and_cat/indices
to list index aliases and indices.As a side effect of using the cat APIs, Elasticsearch skips shard refreshes by default as of 7.0. This means that if you index a document and go to Index Management, the doc count for that index will be unchanged until that index is searched.
We can use the index stats API in lieu of cat indices:
However, these results are still affected by the skipped shard refreshes. Per discussion with Jason Tedor, we'd have to make an explicit refresh call to keep indices up-to-date, but refreshing every index can be very expensive and often unnecesssary:
Based on the above input, we should not bake a refresh into the request for fetching indices. If users need to see the most up-to-date doc count of an index, they should refresh it manually:
The text was updated successfully, but these errors were encountered: