Skip to content

[Search] Reduce polling on Index Details page#251446

Merged
seialkali merged 1 commit intoelastic:mainfrom
seialkali:fix-excessive-polling-index-details
Feb 4, 2026
Merged

[Search] Reduce polling on Index Details page#251446
seialkali merged 1 commit intoelastic:mainfrom
seialkali:fix-excessive-polling-index-details

Conversation

@seialkali
Copy link
Copy Markdown
Contributor

@seialkali seialkali commented Feb 3, 2026

Summary

This change improves how the Index Details page fetches data by reducing unnecessary polling to backend APIs. Previously, the page repeatedly polled two endpoints to keep index metadata up to date, even when the data was not actively changing or required for user interaction.

As part of this update, we reviewed the polling strategy used for:

GET /api/index_management/mapping/{index_name}
GET /internal/index_management/indices/{index_name}
POST /internal/search_indices/${indexName}/documents/search

and adjusted the behavior to better align with how the data is used on the page.

What changed

  • Polling behavior has been reduced or scoped so that requests are only made on initial load, on window focus, and when requested.
  • A Refresh data button was added to allow users to request up to date data.
  • useUserPrivilegesQuery no longer refetches on window focus, which is the default behavior.
  • The queryKey in useUserPrivilegesQuery has been updated to add the indexName.

Screenshots

Index with documents
Screenshot 2026-02-03 at 13 24 12

Index without documents
Screenshot 2026-02-03 at 13 24 26

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.

Release note

Reduced background polling on the Index Details page to avoid unnecessary API requests.

@seialkali seialkali requested a review from a team as a code owner February 3, 2026 13:16
@seialkali seialkali added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Team:Search v9.4.0 backport:version Backport to applied version labels release_note:fix v9.2.5 v9.3.1 and removed backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes labels Feb 3, 2026
@seialkali seialkali force-pushed the fix-excessive-polling-index-details branch from 37f3f14 to 4fdd45b Compare February 3, 2026 13:37
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
searchGettingStarted 165.4KB 165.4KB +22.0B
searchIndices 215.9KB 216.2KB +290.0B
total +312.0B

History

@seialkali seialkali merged commit b5e4dbe into elastic:main Feb 4, 2026
16 checks passed
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 9.2, 9.3

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 4, 2026
## Summary

This change improves how the Index Details page fetches data by reducing
unnecessary polling to backend APIs. Previously, the page repeatedly
polled two endpoints to keep index metadata up to date, even when the
data was not actively changing or required for user interaction.

As part of this update, we reviewed the polling strategy used for:

`GET /api/index_management/mapping/{index_name}`
`GET /internal/index_management/indices/{index_name}`
`POST /internal/search_indices/${indexName}/documents/search`

and adjusted the behavior to better align with how the data is used on
the page.

### What changed
- Polling behavior has been reduced or scoped so that requests are only
made on initial load, on window focus, and when requested.
- A `Refresh data` button was added to allow users to request up to date
data.
- `useUserPrivilegesQuery` no longer refetches on window focus, which is
the default behavior.
- The `queryKey` in `useUserPrivilegesQuery` has been updated to add the
`indexName`.

### Screenshots

**Index with documents**
<img width="700" height="828" alt="Screenshot 2026-02-03 at 13 24 12"
src="https://github.com/user-attachments/assets/c8a99e1e-4f67-4bfd-9b7a-4c7490f8cb7d"
/>

**Index without documents**
<img width="700" height="829" alt="Screenshot 2026-02-03 at 13 24 26"
src="https://github.com/user-attachments/assets/8d752199-2ecf-47e6-b47e-f1966590f0c2"
/>

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials~
- [ ] ~[Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios~
- [ ] ~If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)~
- [ ] ~This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.~
- [ ] ~[Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed~
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

## Release note

Reduced background polling on the Index Details page to avoid
unnecessary API requests.

(cherry picked from commit b5e4dbe)
@kibanamachine
Copy link
Copy Markdown
Contributor

💔 Some backports could not be created

Status Branch Result
9.2 Backport failed because of merge conflicts
9.3

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

Manual backport

To create the backport manually run:

node scripts/backport --pr 251446

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Feb 4, 2026
# Backport

This will backport the following commits from `main` to `9.3`:
- [[Search] Reduce polling on Index Details page
(#251446)](#251446)

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

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

<!--BACKPORT
[{"author":{"name":"Brittany","email":"seialkali@gmail.com"},"sourceCommit":{"committedDate":"2026-02-04T11:09:01Z","message":"[Search]
Reduce polling on Index Details page (#251446)\n\n## Summary\n\nThis
change improves how the Index Details page fetches data by
reducing\nunnecessary polling to backend APIs. Previously, the page
repeatedly\npolled two endpoints to keep index metadata up to date, even
when the\ndata was not actively changing or required for user
interaction.\n\nAs part of this update, we reviewed the polling strategy
used for:\n\n`GET /api/index_management/mapping/{index_name}`\n`GET
/internal/index_management/indices/{index_name}`\n`POST
/internal/search_indices/${indexName}/documents/search`\n\nand adjusted
the behavior to better align with how the data is used on\nthe
page.\n\n### What changed\n- Polling behavior has been reduced or scoped
so that requests are only\nmade on initial load, on window focus, and
when requested.\n- A `Refresh data` button was added to allow users to
request up to date\ndata.\n- `useUserPrivilegesQuery` no longer
refetches on window focus, which is\nthe default behavior.\n- The
`queryKey` in `useUserPrivilegesQuery` has been updated to add
the\n`indexName`.\n\n### Screenshots\n\n**Index with documents**\n<img
width=\"700\" height=\"828\" alt=\"Screenshot 2026-02-03 at 13 24
12\"\nsrc=\"https://github.com/user-attachments/assets/c8a99e1e-4f67-4bfd-9b7a-4c7490f8cb7d\"\n/>\n\n**Index
without documents**\n<img width=\"700\" height=\"829\" alt=\"Screenshot
2026-02-03 at 13 24
26\"\nsrc=\"https://github.com/user-attachments/assets/8d752199-2ecf-47e6-b47e-f1966590f0c2\"\n/>\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [x] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials~\n- [ ] ~[Unit
or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios~\n- [ ] ~If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)~\n-
[ ] ~This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.~\n- [ ] ~[Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed~\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n## Release note\n\nReduced
background polling on the Index Details page to avoid\nunnecessary API
requests.","sha":"b5e4dbeade4a97d5a98cfbdbb6eff44ceee1a137","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Search","backport:version","v9.4.0","v9.2.5","v9.3.1"],"title":"[Search]
Reduce polling on Index Details
page","number":251446,"url":"https://github.com/elastic/kibana/pull/251446","mergeCommit":{"message":"[Search]
Reduce polling on Index Details page (#251446)\n\n## Summary\n\nThis
change improves how the Index Details page fetches data by
reducing\nunnecessary polling to backend APIs. Previously, the page
repeatedly\npolled two endpoints to keep index metadata up to date, even
when the\ndata was not actively changing or required for user
interaction.\n\nAs part of this update, we reviewed the polling strategy
used for:\n\n`GET /api/index_management/mapping/{index_name}`\n`GET
/internal/index_management/indices/{index_name}`\n`POST
/internal/search_indices/${indexName}/documents/search`\n\nand adjusted
the behavior to better align with how the data is used on\nthe
page.\n\n### What changed\n- Polling behavior has been reduced or scoped
so that requests are only\nmade on initial load, on window focus, and
when requested.\n- A `Refresh data` button was added to allow users to
request up to date\ndata.\n- `useUserPrivilegesQuery` no longer
refetches on window focus, which is\nthe default behavior.\n- The
`queryKey` in `useUserPrivilegesQuery` has been updated to add
the\n`indexName`.\n\n### Screenshots\n\n**Index with documents**\n<img
width=\"700\" height=\"828\" alt=\"Screenshot 2026-02-03 at 13 24
12\"\nsrc=\"https://github.com/user-attachments/assets/c8a99e1e-4f67-4bfd-9b7a-4c7490f8cb7d\"\n/>\n\n**Index
without documents**\n<img width=\"700\" height=\"829\" alt=\"Screenshot
2026-02-03 at 13 24
26\"\nsrc=\"https://github.com/user-attachments/assets/8d752199-2ecf-47e6-b47e-f1966590f0c2\"\n/>\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [x] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials~\n- [ ] ~[Unit
or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios~\n- [ ] ~If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)~\n-
[ ] ~This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.~\n- [ ] ~[Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed~\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n## Release note\n\nReduced
background polling on the Index Details page to avoid\nunnecessary API
requests.","sha":"b5e4dbeade4a97d5a98cfbdbb6eff44ceee1a137"}},"sourceBranch":"main","suggestedTargetBranches":["9.2","9.3"],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/251446","number":251446,"mergeCommit":{"message":"[Search]
Reduce polling on Index Details page (#251446)\n\n## Summary\n\nThis
change improves how the Index Details page fetches data by
reducing\nunnecessary polling to backend APIs. Previously, the page
repeatedly\npolled two endpoints to keep index metadata up to date, even
when the\ndata was not actively changing or required for user
interaction.\n\nAs part of this update, we reviewed the polling strategy
used for:\n\n`GET /api/index_management/mapping/{index_name}`\n`GET
/internal/index_management/indices/{index_name}`\n`POST
/internal/search_indices/${indexName}/documents/search`\n\nand adjusted
the behavior to better align with how the data is used on\nthe
page.\n\n### What changed\n- Polling behavior has been reduced or scoped
so that requests are only\nmade on initial load, on window focus, and
when requested.\n- A `Refresh data` button was added to allow users to
request up to date\ndata.\n- `useUserPrivilegesQuery` no longer
refetches on window focus, which is\nthe default behavior.\n- The
`queryKey` in `useUserPrivilegesQuery` has been updated to add
the\n`indexName`.\n\n### Screenshots\n\n**Index with documents**\n<img
width=\"700\" height=\"828\" alt=\"Screenshot 2026-02-03 at 13 24
12\"\nsrc=\"https://github.com/user-attachments/assets/c8a99e1e-4f67-4bfd-9b7a-4c7490f8cb7d\"\n/>\n\n**Index
without documents**\n<img width=\"700\" height=\"829\" alt=\"Screenshot
2026-02-03 at 13 24
26\"\nsrc=\"https://github.com/user-attachments/assets/8d752199-2ecf-47e6-b47e-f1966590f0c2\"\n/>\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [x] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials~\n- [ ] ~[Unit
or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios~\n- [ ] ~If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)~\n-
[ ] ~This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.~\n- [ ] ~[Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed~\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n## Release note\n\nReduced
background polling on the Index Details page to avoid\nunnecessary API
requests.","sha":"b5e4dbeade4a97d5a98cfbdbb6eff44ceee1a137"}},{"branch":"9.2","label":"v9.2.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.3","label":"v9.3.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Brittany <seialkali@gmail.com>
@seialkali
Copy link
Copy Markdown
Contributor Author

💚 All backports created successfully

Status Branch Result
9.2

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

Questions ?

Please refer to the Backport tool documentation

seialkali added a commit to seialkali/kibana that referenced this pull request Feb 4, 2026
## Summary

This change improves how the Index Details page fetches data by reducing
unnecessary polling to backend APIs. Previously, the page repeatedly
polled two endpoints to keep index metadata up to date, even when the
data was not actively changing or required for user interaction.

As part of this update, we reviewed the polling strategy used for:

`GET /api/index_management/mapping/{index_name}`
`GET /internal/index_management/indices/{index_name}`
`POST /internal/search_indices/${indexName}/documents/search`

and adjusted the behavior to better align with how the data is used on
the page.

### What changed
- Polling behavior has been reduced or scoped so that requests are only
made on initial load, on window focus, and when requested.
- A `Refresh data` button was added to allow users to request up to date
data.
- `useUserPrivilegesQuery` no longer refetches on window focus, which is
the default behavior.
- The `queryKey` in `useUserPrivilegesQuery` has been updated to add the
`indexName`.

### Screenshots

**Index with documents**
<img width="700" height="828" alt="Screenshot 2026-02-03 at 13 24 12"
src="https://github.com/user-attachments/assets/c8a99e1e-4f67-4bfd-9b7a-4c7490f8cb7d"
/>

**Index without documents**
<img width="700" height="829" alt="Screenshot 2026-02-03 at 13 24 26"
src="https://github.com/user-attachments/assets/8d752199-2ecf-47e6-b47e-f1966590f0c2"
/>

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials~
- [ ] ~[Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios~
- [ ] ~If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)~
- [ ] ~This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.~
- [ ] ~[Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed~
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

## Release note

Reduced background polling on the Index Details page to avoid
unnecessary API requests.

(cherry picked from commit b5e4dbe)

# Conflicts:
#	x-pack/solutions/search/plugins/search_indices/public/components/indices/details_page_data.tsx
seialkali added a commit to seialkali/kibana that referenced this pull request Feb 4, 2026
This change improves how the Index Details page fetches data by reducing
unnecessary polling to backend APIs. Previously, the page repeatedly
polled two endpoints to keep index metadata up to date, even when the
data was not actively changing or required for user interaction.

As part of this update, we reviewed the polling strategy used for:

`GET /api/index_management/mapping/{index_name}`
`GET /internal/index_management/indices/{index_name}`
`POST /internal/search_indices/${indexName}/documents/search`

and adjusted the behavior to better align with how the data is used on
the page.

- Polling behavior has been reduced or scoped so that requests are only
made on initial load, on window focus, and when requested.
- A `Refresh data` button was added to allow users to request up to date
data.
- `useUserPrivilegesQuery` no longer refetches on window focus, which is
the default behavior.
- The `queryKey` in `useUserPrivilegesQuery` has been updated to add the
`indexName`.

**Index with documents**
<img width="700" height="828" alt="Screenshot 2026-02-03 at 13 24 12"
src="https://github.com/user-attachments/assets/c8a99e1e-4f67-4bfd-9b7a-4c7490f8cb7d"
/>

**Index without documents**
<img width="700" height="829" alt="Screenshot 2026-02-03 at 13 24 26"
src="https://github.com/user-attachments/assets/8d752199-2ecf-47e6-b47e-f1966590f0c2"
/>

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials~
- [ ] ~[Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios~
- [ ] ~If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)~
- [ ] ~This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.~
- [ ] ~[Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed~
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

Reduced background polling on the Index Details page to avoid
unnecessary API requests.

(cherry picked from commit b5e4dbe)
seialkali added a commit to seialkali/kibana that referenced this pull request Feb 4, 2026
This change improves how the Index Details page fetches data by reducing
unnecessary polling to backend APIs. Previously, the page repeatedly
polled two endpoints to keep index metadata up to date, even when the
data was not actively changing or required for user interaction.

As part of this update, we reviewed the polling strategy used for:

`GET /api/index_management/mapping/{index_name}`
`GET /internal/index_management/indices/{index_name}`
`POST /internal/search_indices/${indexName}/documents/search`

and adjusted the behavior to better align with how the data is used on
the page.

- Polling behavior has been reduced or scoped so that requests are only
made on initial load, on window focus, and when requested.
- A `Refresh data` button was added to allow users to request up to date
data.
- `useUserPrivilegesQuery` no longer refetches on window focus, which is
the default behavior.
- The `queryKey` in `useUserPrivilegesQuery` has been updated to add the
`indexName`.

**Index with documents**
<img width="700" height="828" alt="Screenshot 2026-02-03 at 13 24 12"
src="https://github.com/user-attachments/assets/c8a99e1e-4f67-4bfd-9b7a-4c7490f8cb7d"
/>

**Index without documents**
<img width="700" height="829" alt="Screenshot 2026-02-03 at 13 24 26"
src="https://github.com/user-attachments/assets/8d752199-2ecf-47e6-b47e-f1966590f0c2"
/>

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials~
- [ ] ~[Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios~
- [ ] ~If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)~
- [ ] ~This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.~
- [ ] ~[Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed~
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

Reduced background polling on the Index Details page to avoid
unnecessary API requests.

(cherry picked from commit b5e4dbe)
seialkali added a commit that referenced this pull request Feb 4, 2026
# Backport

This will backport the following commits from `main` to `9.2`:
- [[Search] Reduce polling on Index Details page
(#251446)](#251446)

<!--- Backport version: 10.2.0 -->

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

<!--BACKPORT
[{"author":{"name":"Brittany","email":"seialkali@gmail.com"},"sourceCommit":{"committedDate":"2026-02-04T11:09:01Z","message":"[Search]
Reduce polling on Index Details page (#251446)\n\n## Summary\n\nThis
change improves how the Index Details page fetches data by
reducing\nunnecessary polling to backend APIs. Previously, the page
repeatedly\npolled two endpoints to keep index metadata up to date, even
when the\ndata was not actively changing or required for user
interaction.\n\nAs part of this update, we reviewed the polling strategy
used for:\n\n`GET /api/index_management/mapping/{index_name}`\n`GET
/internal/index_management/indices/{index_name}`\n`POST
/internal/search_indices/${indexName}/documents/search`\n\nand adjusted
the behavior to better align with how the data is used on\nthe
page.\n\n### What changed\n- Polling behavior has been reduced or scoped
so that requests are only\nmade on initial load, on window focus, and
when requested.\n- A `Refresh data` button was added to allow users to
request up to date\ndata.\n- `useUserPrivilegesQuery` no longer
refetches on window focus, which is\nthe default behavior.\n- The
`queryKey` in `useUserPrivilegesQuery` has been updated to add
the\n`indexName`.\n\n### Screenshots\n\n**Index with documents**\n<img
width=\"700\" height=\"828\" alt=\"Screenshot 2026-02-03 at 13 24
12\"\nsrc=\"https://github.com/user-attachments/assets/c8a99e1e-4f67-4bfd-9b7a-4c7490f8cb7d\"\n/>\n\n**Index
without documents**\n<img width=\"700\" height=\"829\" alt=\"Screenshot
2026-02-03 at 13 24
26\"\nsrc=\"https://github.com/user-attachments/assets/8d752199-2ecf-47e6-b47e-f1966590f0c2\"\n/>\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [x] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials~\n- [ ] ~[Unit
or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios~\n- [ ] ~If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)~\n-
[ ] ~This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.~\n- [ ] ~[Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed~\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n## Release note\n\nReduced
background polling on the Index Details page to avoid\nunnecessary API
requests.","sha":"b5e4dbeade4a97d5a98cfbdbb6eff44ceee1a137","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Search","backport:version","v9.3.0","v9.4.0","v9.2.5","v9.3.1"],"title":"[Search]
Reduce polling on Index Details
page","number":251446,"url":"https://github.com/elastic/kibana/pull/251446","mergeCommit":{"message":"[Search]
Reduce polling on Index Details page (#251446)\n\n## Summary\n\nThis
change improves how the Index Details page fetches data by
reducing\nunnecessary polling to backend APIs. Previously, the page
repeatedly\npolled two endpoints to keep index metadata up to date, even
when the\ndata was not actively changing or required for user
interaction.\n\nAs part of this update, we reviewed the polling strategy
used for:\n\n`GET /api/index_management/mapping/{index_name}`\n`GET
/internal/index_management/indices/{index_name}`\n`POST
/internal/search_indices/${indexName}/documents/search`\n\nand adjusted
the behavior to better align with how the data is used on\nthe
page.\n\n### What changed\n- Polling behavior has been reduced or scoped
so that requests are only\nmade on initial load, on window focus, and
when requested.\n- A `Refresh data` button was added to allow users to
request up to date\ndata.\n- `useUserPrivilegesQuery` no longer
refetches on window focus, which is\nthe default behavior.\n- The
`queryKey` in `useUserPrivilegesQuery` has been updated to add
the\n`indexName`.\n\n### Screenshots\n\n**Index with documents**\n<img
width=\"700\" height=\"828\" alt=\"Screenshot 2026-02-03 at 13 24
12\"\nsrc=\"https://github.com/user-attachments/assets/c8a99e1e-4f67-4bfd-9b7a-4c7490f8cb7d\"\n/>\n\n**Index
without documents**\n<img width=\"700\" height=\"829\" alt=\"Screenshot
2026-02-03 at 13 24
26\"\nsrc=\"https://github.com/user-attachments/assets/8d752199-2ecf-47e6-b47e-f1966590f0c2\"\n/>\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [x] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials~\n- [ ] ~[Unit
or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios~\n- [ ] ~If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)~\n-
[ ] ~This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.~\n- [ ] ~[Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed~\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n## Release note\n\nReduced
background polling on the Index Details page to avoid\nunnecessary API
requests.","sha":"b5e4dbeade4a97d5a98cfbdbb6eff44ceee1a137"}},"sourceBranch":"main","suggestedTargetBranches":["9.2"],"targetPullRequestStates":[{"branch":"9.3","label":"v9.3.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/251633","number":251633,"state":"MERGED","mergeCommit":{"sha":"d3c688337785dc583b8a60a47ee873cfca79a999","message":"[9.3]
[Search] Reduce polling on Index Details page (#251446) (#251633)\n\n#
Backport\n\nThis will backport the following commits from `main` to
`9.3`:\n- [[Search] Reduce polling on Index Details
page\n(#251446)](https://github.com/elastic/kibana/pull/251446)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by:
Brittany
<seialkali@gmail.com>"}},{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/251446","number":251446,"mergeCommit":{"message":"[Search]
Reduce polling on Index Details page (#251446)\n\n## Summary\n\nThis
change improves how the Index Details page fetches data by
reducing\nunnecessary polling to backend APIs. Previously, the page
repeatedly\npolled two endpoints to keep index metadata up to date, even
when the\ndata was not actively changing or required for user
interaction.\n\nAs part of this update, we reviewed the polling strategy
used for:\n\n`GET /api/index_management/mapping/{index_name}`\n`GET
/internal/index_management/indices/{index_name}`\n`POST
/internal/search_indices/${indexName}/documents/search`\n\nand adjusted
the behavior to better align with how the data is used on\nthe
page.\n\n### What changed\n- Polling behavior has been reduced or scoped
so that requests are only\nmade on initial load, on window focus, and
when requested.\n- A `Refresh data` button was added to allow users to
request up to date\ndata.\n- `useUserPrivilegesQuery` no longer
refetches on window focus, which is\nthe default behavior.\n- The
`queryKey` in `useUserPrivilegesQuery` has been updated to add
the\n`indexName`.\n\n### Screenshots\n\n**Index with documents**\n<img
width=\"700\" height=\"828\" alt=\"Screenshot 2026-02-03 at 13 24
12\"\nsrc=\"https://github.com/user-attachments/assets/c8a99e1e-4f67-4bfd-9b7a-4c7490f8cb7d\"\n/>\n\n**Index
without documents**\n<img width=\"700\" height=\"829\" alt=\"Screenshot
2026-02-03 at 13 24
26\"\nsrc=\"https://github.com/user-attachments/assets/8d752199-2ecf-47e6-b47e-f1966590f0c2\"\n/>\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [x] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials~\n- [ ] ~[Unit
or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios~\n- [ ] ~If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)~\n-
[ ] ~This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.~\n- [ ] ~[Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed~\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n## Release note\n\nReduced
background polling on the Index Details page to avoid\nunnecessary API
requests.","sha":"b5e4dbeade4a97d5a98cfbdbb6eff44ceee1a137"}},{"branch":"9.2","label":"v9.2.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants