Skip to content

[index mgmt] Use esql instead of query dsl to get the index count#252422

Merged
mattkime merged 1 commit intomainfrom
idx_mgmt_count_long_indices
Feb 10, 2026
Merged

[index mgmt] Use esql instead of query dsl to get the index count#252422
mattkime merged 1 commit intomainfrom
idx_mgmt_count_long_indices

Conversation

@mattkime
Copy link
Contributor

@mattkime mattkime commented Feb 9, 2026

Summary

Closes #252409

In some cases the index management index list doc count will show error if the combined length of indices exceeds 4096 bytes. Indices can have names up to 255 chars so this problem could occur on a page size as small as 20.

The solution is to use ESQL instead of query dsl to get the index doc counts since the index list gets passed as part of the query body instead of as part of the url.

Release Notes

Fixes problem in 9.3.0 loading the doc count in index management when viewing larger page sizes with long index names.

@mattkime mattkime self-assigned this Feb 9, 2026
@mattkime mattkime added Feature:Kibana Management Feature label for Data Views, Advanced Setting, Saved Object management pages Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t// bug Fixes for quality problems that affect the customer experience v9.3.1 v9.4.0 labels Feb 9, 2026
@mattkime mattkime marked this pull request as ready for review February 9, 2026 22:20
@mattkime mattkime requested a review from a team as a code owner February 9, 2026 22:20
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-management (Team:Kibana Management)

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

✅ unchanged

cc @mattkime

@mattkime mattkime changed the title use esql instead of query dsl to get the index count Feb 10, 2026
@mattkime mattkime added release_note:fix backport:version Backport to applied version labels labels Feb 10, 2026
@ElenaStoeva ElenaStoeva self-requested a review February 10, 2026 11:48
Copy link
Contributor

@ElenaStoeva ElenaStoeva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix @mattkime! Tested locally with the scenario from the API integration test and it works well. Changes also lgtm.

@mattkime mattkime merged commit 611fcf9 into main Feb 10, 2026
35 checks passed
@mattkime mattkime deleted the idx_mgmt_count_long_indices branch February 10, 2026 14:12
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 9.3

https://github.com/elastic/kibana/actions/runs/21868330580

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 10, 2026
…astic#252422)

## Summary

Closes elastic#252409

In some cases the index management index list doc count will show error
if the combined length of indices exceeds 4096 bytes. Indices can have
names up to 255 chars so this problem could occur on a page size as
small as 20.

The solution is to use ESQL instead of query dsl to get the index doc
counts since the index list gets passed as part of the query body
instead of as part of the url.

### Release Notes

Fixes problem in 9.3.0 loading the doc count in index management when
viewing larger page sizes with long index names.

(cherry picked from commit 611fcf9)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
9.3

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Feb 10, 2026
…nt (#252422) (#252547)

# Backport

This will backport the following commits from `main` to `9.3`:
- [[index mgmt] Use esql instead of query dsl to get the index count
(#252422)](#252422)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Matthew
Kime","email":"matt@mattki.me"},"sourceCommit":{"committedDate":"2026-02-10T14:12:37Z","message":"[index
mgmt] Use esql instead of query dsl to get the index count
(#252422)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/252409\n\nIn some cases the
index management index list doc count will show error\nif the combined
length of indices exceeds 4096 bytes. Indices can have\nnames up to 255
chars so this problem could occur on a page size as\nsmall as 20.\n\nThe
solution is to use ESQL instead of query dsl to get the index
doc\ncounts since the index list gets passed as part of the query
body\ninstead of as part of the url.\n\n### Release Notes\n\nFixes
problem in 9.3.0 loading the doc count in index management when\nviewing
larger page sizes with long index
names.","sha":"611fcf955c68603a4d736d37fa29870d8f43395e","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","Feature:Kibana
Management","Team:Kibana
Management","backport:version","v9.4.0","v9.3.1"],"title":"[index mgmt]
Use esql instead of query dsl to get the index
count","number":252422,"url":"https://github.com/elastic/kibana/pull/252422","mergeCommit":{"message":"[index
mgmt] Use esql instead of query dsl to get the index count
(#252422)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/252409\n\nIn some cases the
index management index list doc count will show error\nif the combined
length of indices exceeds 4096 bytes. Indices can have\nnames up to 255
chars so this problem could occur on a page size as\nsmall as 20.\n\nThe
solution is to use ESQL instead of query dsl to get the index
doc\ncounts since the index list gets passed as part of the query
body\ninstead of as part of the url.\n\n### Release Notes\n\nFixes
problem in 9.3.0 loading the doc count in index management when\nviewing
larger page sizes with long index
names.","sha":"611fcf955c68603a4d736d37fa29870d8f43395e"}},"sourceBranch":"main","suggestedTargetBranches":["9.3"],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/252422","number":252422,"mergeCommit":{"message":"[index
mgmt] Use esql instead of query dsl to get the index count
(#252422)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/252409\n\nIn some cases the
index management index list doc count will show error\nif the combined
length of indices exceeds 4096 bytes. Indices can have\nnames up to 255
chars so this problem could occur on a page size as\nsmall as 20.\n\nThe
solution is to use ESQL instead of query dsl to get the index
doc\ncounts since the index list gets passed as part of the query
body\ninstead of as part of the url.\n\n### Release Notes\n\nFixes
problem in 9.3.0 loading the doc count in index management when\nviewing
larger page sizes with long index
names.","sha":"611fcf955c68603a4d736d37fa29870d8f43395e"}},{"branch":"9.3","label":"v9.3.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Matthew Kime <matt@mattki.me>
mbondyra added a commit to mbondyra/kibana that referenced this pull request Feb 10, 2026
* commit '7dcc1fe3c205d2de0c3ca3f65804f21de09013c3': (285 commits)
  Enrich kbn-check-saved-objects-cli README with CI and manual usage docs (elastic#252557)
  [Discover] Add feature flag to make ESQL the default query mode (elastic#252268)
  Add maskProps.headerZindexLocation above to inspect component flyout (elastic#252543)
  [Security Solution][Atack/Alerts] Flyout header: Assignees  (elastic#252190)
  Upgrade EUI to v112.3.0 (elastic#252315)
  [Fleet] Make save_knowledge_base async in streaming state machine (elastic#252328)
  Upgrade @smithy/config-resolver 4.3.0 → 4.4.6 (elastic#252457)
  [Lens as API] Add colorMapping support for XY charts (ES|QL data layers) (elastic#252051)
  [WorkplaceAI] Add Google Drive data source and connector (elastic#250677)
  [Scout] Move GlobalSearch FTR tests to Scout (elastic#252201)
  [EDR Workflows] Fix osquery pack results display when agent clock is skewed (elastic#251417)
  [Observability Onboarding] Apply integrations limit after dedup in parseIntegrationsTSV (elastic#252486)
  [Entity Analytics] Update `host.ip` aggregation to remove painless script (elastic#252426)
  Address `@elastic/eui/require-table-caption` lint violations across `@elastic/obs-presentation-team` files (elastic#251050)
  Consolidate JSON stringify dependencies (elastic#251890)
  [index mgmt] Use esql instead of query dsl to get the index count (elastic#252422)
  Add Usage API Plugin (elastic#252434)
  Cases All Templates page (elastic#250372)
  [Agent Builder] Default value for optional params in ESQL tools (elastic#238472)
  [Fleet] Add upgrade_details.metadata.reason to AgentResponseSchema (elastic#252485)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels bug Fixes for quality problems that affect the customer experience Feature:Kibana Management Feature label for Data Views, Advanced Setting, Saved Object management pages release_note:fix Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t// v9.3.0 v9.3.1 v9.4.0

4 participants