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 sorting support to diagnostic APIs #88094

Open
dakrone opened this issue Jun 27, 2022 · 1 comment
Open

Add sorting support to diagnostic APIs #88094

dakrone opened this issue Jun 27, 2022 · 1 comment
Labels
:Data Management/Stats Statistics tracking and retrieval APIs >enhancement Team:Data Management Meta label for data/management team

Comments

@dakrone
Copy link
Member

dakrone commented Jun 27, 2022

Description

Some of our APIs can be quite large depending on the number of indices or shards in the cluster. To assist a user (or ourselves) finding what they need from some of these APIs, it would be beneficial if we could sort the output of some of these APIs by certain criteria.

An example of this could look like:

GET /_stats?sort=indices.status:desc,indices.uuid:asc
{
  "_shards": {...},
  "_all": {...},
  "indices": {
    "my-index-001920": {
      "uuid": "b-uuid",
      "status": "open",
      …
    },
    "my-index-002812": {
      "uuid": "d-uuid",
      "status": "open",
      …
    },
    "my-index-000120": {
      "uuid": "a-uuid",
      "status": "closed",
      … 
    }
}

This would also be very helpful for pagination (#87555) and filtering (#88095).

Some APIs that could support sorting:

  • Indices stats
  • ILM explain
  • Get indices (settings/mappings/aliases)
  • Index shard stores
@dakrone dakrone added >enhancement :Data Management/Stats Statistics tracking and retrieval APIs labels Jun 27, 2022
@elasticmachine elasticmachine added the Team:Data Management Meta label for data/management team label Jun 27, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Stats Statistics tracking and retrieval APIs >enhancement Team:Data Management Meta label for data/management team
Projects
None yet
Development

No branches or pull requests

2 participants