[OnWeek][Discover] Allow to fetch more documents on Discover page#163784
Merged
jughosta merged 70 commits intoelastic:mainfrom Aug 17, 2023
Merged
[OnWeek][Discover] Allow to fetch more documents on Discover page#163784jughosta merged 70 commits intoelastic:mainfrom
jughosta merged 70 commits intoelastic:mainfrom
Conversation
…to onweek-date-nanos-pagination
…agination # Conflicts: # src/plugins/discover/public/application/context/hooks/use_context_app_fetch.tsx # src/plugins/discover/public/application/context/services/context.ts # src/plugins/discover/public/application/main/components/layout/discover_documents.tsx # src/plugins/discover/public/application/main/services/discover_data_state_container.ts # src/plugins/discover/public/components/discover_grid/discover_grid.tsx
…agination # Conflicts: # src/plugins/discover/public/application/context/hooks/use_context_app_fetch.tsx # src/plugins/discover/public/application/main/utils/update_search_source.ts # src/plugins/discover/public/utils/get_sharing_data.ts
davismcphee
approved these changes
Aug 16, 2023
Contributor
davismcphee
left a comment
There was a problem hiding this comment.
Pulled and tested one last time and confirmed the search sessions issue is all fixed! Thanks for all the work on this, it really is a long overdue feature and I think many users will appreciate it. Great work and LGTM 👍
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: cc @jughosta |
andreadelrio
approved these changes
Aug 17, 2023
Contributor
andreadelrio
left a comment
There was a problem hiding this comment.
LGTM, nice improvements!
Merged
4 tasks
2 tasks
lukasolson
added a commit
that referenced
this pull request
Mar 18, 2025
## Summary Resolves #213629. Since #163784 we have included a `format` parameter in the `sort` that we send to Elasticsearch. This worked for everything except rollup data views, which break when the `format` parameter is provided. This restores the behavior prior to that PR (we still send the `sort` but don't include the `format` parameter). Ideally we would probably not send the timestamp field at all for rollup data views since we treat them as if they are non-time-based, but this would require a bit of a refactor, and rollups are deprecated anyway. ### Checklist - [x] [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 - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed ### Release notes Fixes opening a rollup data view in Discover. Co-authored-by: Matthew Kime <matt@mattki.me>
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Mar 18, 2025
## Summary Resolves elastic#213629. Since elastic#163784 we have included a `format` parameter in the `sort` that we send to Elasticsearch. This worked for everything except rollup data views, which break when the `format` parameter is provided. This restores the behavior prior to that PR (we still send the `sort` but don't include the `format` parameter). Ideally we would probably not send the timestamp field at all for rollup data views since we treat them as if they are non-time-based, but this would require a bit of a refactor, and rollups are deprecated anyway. ### Checklist - [x] [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 - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed ### Release notes Fixes opening a rollup data view in Discover. Co-authored-by: Matthew Kime <matt@mattki.me> (cherry picked from commit 2de4b33)
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Mar 18, 2025
## Summary Resolves elastic#213629. Since elastic#163784 we have included a `format` parameter in the `sort` that we send to Elasticsearch. This worked for everything except rollup data views, which break when the `format` parameter is provided. This restores the behavior prior to that PR (we still send the `sort` but don't include the `format` parameter). Ideally we would probably not send the timestamp field at all for rollup data views since we treat them as if they are non-time-based, but this would require a bit of a refactor, and rollups are deprecated anyway. ### Checklist - [x] [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 - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed ### Release notes Fixes opening a rollup data view in Discover. Co-authored-by: Matthew Kime <matt@mattki.me> (cherry picked from commit 2de4b33)
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Mar 18, 2025
## Summary Resolves elastic#213629. Since elastic#163784 we have included a `format` parameter in the `sort` that we send to Elasticsearch. This worked for everything except rollup data views, which break when the `format` parameter is provided. This restores the behavior prior to that PR (we still send the `sort` but don't include the `format` parameter). Ideally we would probably not send the timestamp field at all for rollup data views since we treat them as if they are non-time-based, but this would require a bit of a refactor, and rollups are deprecated anyway. ### Checklist - [x] [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 - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed ### Release notes Fixes opening a rollup data view in Discover. Co-authored-by: Matthew Kime <matt@mattki.me> (cherry picked from commit 2de4b33)
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Mar 18, 2025
## Summary Resolves elastic#213629. Since elastic#163784 we have included a `format` parameter in the `sort` that we send to Elasticsearch. This worked for everything except rollup data views, which break when the `format` parameter is provided. This restores the behavior prior to that PR (we still send the `sort` but don't include the `format` parameter). Ideally we would probably not send the timestamp field at all for rollup data views since we treat them as if they are non-time-based, but this would require a bit of a refactor, and rollups are deprecated anyway. ### Checklist - [x] [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 - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed ### Release notes Fixes opening a rollup data view in Discover. Co-authored-by: Matthew Kime <matt@mattki.me> (cherry picked from commit 2de4b33)
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Mar 18, 2025
## Summary Resolves elastic#213629. Since elastic#163784 we have included a `format` parameter in the `sort` that we send to Elasticsearch. This worked for everything except rollup data views, which break when the `format` parameter is provided. This restores the behavior prior to that PR (we still send the `sort` but don't include the `format` parameter). Ideally we would probably not send the timestamp field at all for rollup data views since we treat them as if they are non-time-based, but this would require a bit of a refactor, and rollups are deprecated anyway. ### Checklist - [x] [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 - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed ### Release notes Fixes opening a rollup data view in Discover. Co-authored-by: Matthew Kime <matt@mattki.me> (cherry picked from commit 2de4b33)
kibanamachine
added a commit
that referenced
this pull request
Mar 18, 2025
# Backport This will backport the following commits from `main` to `9.0`: - [Fix sort for rollup data views (#214656)](#214656) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Lukas Olson","email":"lukas@elastic.co"},"sourceCommit":{"committedDate":"2025-03-18T17:17:53Z","message":"Fix sort for rollup data views (#214656)\n\n## Summary\n\nResolves https://github.com/elastic/kibana/issues/213629.\n\nSince #163784 we have included a\n`format` parameter in the `sort` that we send to Elasticsearch. This\nworked for everything except rollup data views, which break when the\n`format` parameter is provided.\n\nThis restores the behavior prior to that PR (we still send the `sort`\nbut don't include the `format` parameter). Ideally we would probably not\nsend the timestamp field at all for rollup data views since we treat\nthem as if they are non-time-based, but this would require a bit of a\nrefactor, and rollups are deprecated anyway.\n\n### Checklist\n\n- [x] [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- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n\n### Release notes\n\nFixes opening a rollup data view in Discover.\n\nCo-authored-by: Matthew Kime <matt@mattki.me>","sha":"2de4b331d334454c4b3bb17b75dcdb83207ee9f9","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Search","release_note:fix","Feature:Data Views","Feature:Rollups","Team:DataDiscovery","backport:all-open","v9.1.0"],"title":"Fix sort for rollup data views","number":214656,"url":"https://github.com/elastic/kibana/pull/214656","mergeCommit":{"message":"Fix sort for rollup data views (#214656)\n\n## Summary\n\nResolves https://github.com/elastic/kibana/issues/213629.\n\nSince #163784 we have included a\n`format` parameter in the `sort` that we send to Elasticsearch. This\nworked for everything except rollup data views, which break when the\n`format` parameter is provided.\n\nThis restores the behavior prior to that PR (we still send the `sort`\nbut don't include the `format` parameter). Ideally we would probably not\nsend the timestamp field at all for rollup data views since we treat\nthem as if they are non-time-based, but this would require a bit of a\nrefactor, and rollups are deprecated anyway.\n\n### Checklist\n\n- [x] [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- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n\n### Release notes\n\nFixes opening a rollup data view in Discover.\n\nCo-authored-by: Matthew Kime <matt@mattki.me>","sha":"2de4b331d334454c4b3bb17b75dcdb83207ee9f9"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/214656","number":214656,"mergeCommit":{"message":"Fix sort for rollup data views (#214656)\n\n## Summary\n\nResolves https://github.com/elastic/kibana/issues/213629.\n\nSince #163784 we have included a\n`format` parameter in the `sort` that we send to Elasticsearch. This\nworked for everything except rollup data views, which break when the\n`format` parameter is provided.\n\nThis restores the behavior prior to that PR (we still send the `sort`\nbut don't include the `format` parameter). Ideally we would probably not\nsend the timestamp field at all for rollup data views since we treat\nthem as if they are non-time-based, but this would require a bit of a\nrefactor, and rollups are deprecated anyway.\n\n### Checklist\n\n- [x] [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- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n\n### Release notes\n\nFixes opening a rollup data view in Discover.\n\nCo-authored-by: Matthew Kime <matt@mattki.me>","sha":"2de4b331d334454c4b3bb17b75dcdb83207ee9f9"}}]}] BACKPORT--> Co-authored-by: Lukas Olson <lukas@elastic.co>
kibanamachine
added a commit
that referenced
this pull request
Mar 18, 2025
# Backport This will backport the following commits from `main` to `8.18`: - [Fix sort for rollup data views (#214656)](#214656) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Lukas Olson","email":"lukas@elastic.co"},"sourceCommit":{"committedDate":"2025-03-18T17:17:53Z","message":"Fix sort for rollup data views (#214656)\n\n## Summary\n\nResolves https://github.com/elastic/kibana/issues/213629.\n\nSince #163784 we have included a\n`format` parameter in the `sort` that we send to Elasticsearch. This\nworked for everything except rollup data views, which break when the\n`format` parameter is provided.\n\nThis restores the behavior prior to that PR (we still send the `sort`\nbut don't include the `format` parameter). Ideally we would probably not\nsend the timestamp field at all for rollup data views since we treat\nthem as if they are non-time-based, but this would require a bit of a\nrefactor, and rollups are deprecated anyway.\n\n### Checklist\n\n- [x] [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- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n\n### Release notes\n\nFixes opening a rollup data view in Discover.\n\nCo-authored-by: Matthew Kime <matt@mattki.me>","sha":"2de4b331d334454c4b3bb17b75dcdb83207ee9f9","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Search","release_note:fix","Feature:Data Views","Feature:Rollups","Team:DataDiscovery","backport:all-open","v9.1.0"],"title":"Fix sort for rollup data views","number":214656,"url":"https://github.com/elastic/kibana/pull/214656","mergeCommit":{"message":"Fix sort for rollup data views (#214656)\n\n## Summary\n\nResolves https://github.com/elastic/kibana/issues/213629.\n\nSince #163784 we have included a\n`format` parameter in the `sort` that we send to Elasticsearch. This\nworked for everything except rollup data views, which break when the\n`format` parameter is provided.\n\nThis restores the behavior prior to that PR (we still send the `sort`\nbut don't include the `format` parameter). Ideally we would probably not\nsend the timestamp field at all for rollup data views since we treat\nthem as if they are non-time-based, but this would require a bit of a\nrefactor, and rollups are deprecated anyway.\n\n### Checklist\n\n- [x] [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- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n\n### Release notes\n\nFixes opening a rollup data view in Discover.\n\nCo-authored-by: Matthew Kime <matt@mattki.me>","sha":"2de4b331d334454c4b3bb17b75dcdb83207ee9f9"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/214656","number":214656,"mergeCommit":{"message":"Fix sort for rollup data views (#214656)\n\n## Summary\n\nResolves https://github.com/elastic/kibana/issues/213629.\n\nSince #163784 we have included a\n`format` parameter in the `sort` that we send to Elasticsearch. This\nworked for everything except rollup data views, which break when the\n`format` parameter is provided.\n\nThis restores the behavior prior to that PR (we still send the `sort`\nbut don't include the `format` parameter). Ideally we would probably not\nsend the timestamp field at all for rollup data views since we treat\nthem as if they are non-time-based, but this would require a bit of a\nrefactor, and rollups are deprecated anyway.\n\n### Checklist\n\n- [x] [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- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n\n### Release notes\n\nFixes opening a rollup data view in Discover.\n\nCo-authored-by: Matthew Kime <matt@mattki.me>","sha":"2de4b331d334454c4b3bb17b75dcdb83207ee9f9"}}]}] BACKPORT--> Co-authored-by: Lukas Olson <lukas@elastic.co>
kibanamachine
added a commit
that referenced
this pull request
Mar 18, 2025
# Backport This will backport the following commits from `main` to `8.16`: - [Fix sort for rollup data views (#214656)](#214656) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Lukas Olson","email":"lukas@elastic.co"},"sourceCommit":{"committedDate":"2025-03-18T17:17:53Z","message":"Fix sort for rollup data views (#214656)\n\n## Summary\n\nResolves https://github.com/elastic/kibana/issues/213629.\n\nSince #163784 we have included a\n`format` parameter in the `sort` that we send to Elasticsearch. This\nworked for everything except rollup data views, which break when the\n`format` parameter is provided.\n\nThis restores the behavior prior to that PR (we still send the `sort`\nbut don't include the `format` parameter). Ideally we would probably not\nsend the timestamp field at all for rollup data views since we treat\nthem as if they are non-time-based, but this would require a bit of a\nrefactor, and rollups are deprecated anyway.\n\n### Checklist\n\n- [x] [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- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n\n### Release notes\n\nFixes opening a rollup data view in Discover.\n\nCo-authored-by: Matthew Kime <matt@mattki.me>","sha":"2de4b331d334454c4b3bb17b75dcdb83207ee9f9","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Search","release_note:fix","Feature:Data Views","Feature:Rollups","Team:DataDiscovery","backport:all-open","v9.1.0"],"title":"Fix sort for rollup data views","number":214656,"url":"https://github.com/elastic/kibana/pull/214656","mergeCommit":{"message":"Fix sort for rollup data views (#214656)\n\n## Summary\n\nResolves https://github.com/elastic/kibana/issues/213629.\n\nSince #163784 we have included a\n`format` parameter in the `sort` that we send to Elasticsearch. This\nworked for everything except rollup data views, which break when the\n`format` parameter is provided.\n\nThis restores the behavior prior to that PR (we still send the `sort`\nbut don't include the `format` parameter). Ideally we would probably not\nsend the timestamp field at all for rollup data views since we treat\nthem as if they are non-time-based, but this would require a bit of a\nrefactor, and rollups are deprecated anyway.\n\n### Checklist\n\n- [x] [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- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n\n### Release notes\n\nFixes opening a rollup data view in Discover.\n\nCo-authored-by: Matthew Kime <matt@mattki.me>","sha":"2de4b331d334454c4b3bb17b75dcdb83207ee9f9"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/214656","number":214656,"mergeCommit":{"message":"Fix sort for rollup data views (#214656)\n\n## Summary\n\nResolves https://github.com/elastic/kibana/issues/213629.\n\nSince #163784 we have included a\n`format` parameter in the `sort` that we send to Elasticsearch. This\nworked for everything except rollup data views, which break when the\n`format` parameter is provided.\n\nThis restores the behavior prior to that PR (we still send the `sort`\nbut don't include the `format` parameter). Ideally we would probably not\nsend the timestamp field at all for rollup data views since we treat\nthem as if they are non-time-based, but this would require a bit of a\nrefactor, and rollups are deprecated anyway.\n\n### Checklist\n\n- [x] [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- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n\n### Release notes\n\nFixes opening a rollup data view in Discover.\n\nCo-authored-by: Matthew Kime <matt@mattki.me>","sha":"2de4b331d334454c4b3bb17b75dcdb83207ee9f9"}}]}] BACKPORT--> Co-authored-by: Lukas Olson <lukas@elastic.co>
kibanamachine
added a commit
that referenced
this pull request
Mar 18, 2025
# Backport This will backport the following commits from `main` to `8.17`: - [Fix sort for rollup data views (#214656)](#214656) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Lukas Olson","email":"lukas@elastic.co"},"sourceCommit":{"committedDate":"2025-03-18T17:17:53Z","message":"Fix sort for rollup data views (#214656)\n\n## Summary\n\nResolves https://github.com/elastic/kibana/issues/213629.\n\nSince #163784 we have included a\n`format` parameter in the `sort` that we send to Elasticsearch. This\nworked for everything except rollup data views, which break when the\n`format` parameter is provided.\n\nThis restores the behavior prior to that PR (we still send the `sort`\nbut don't include the `format` parameter). Ideally we would probably not\nsend the timestamp field at all for rollup data views since we treat\nthem as if they are non-time-based, but this would require a bit of a\nrefactor, and rollups are deprecated anyway.\n\n### Checklist\n\n- [x] [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- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n\n### Release notes\n\nFixes opening a rollup data view in Discover.\n\nCo-authored-by: Matthew Kime <matt@mattki.me>","sha":"2de4b331d334454c4b3bb17b75dcdb83207ee9f9","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Search","release_note:fix","Feature:Data Views","Feature:Rollups","Team:DataDiscovery","backport:all-open","v9.1.0"],"title":"Fix sort for rollup data views","number":214656,"url":"https://github.com/elastic/kibana/pull/214656","mergeCommit":{"message":"Fix sort for rollup data views (#214656)\n\n## Summary\n\nResolves https://github.com/elastic/kibana/issues/213629.\n\nSince #163784 we have included a\n`format` parameter in the `sort` that we send to Elasticsearch. This\nworked for everything except rollup data views, which break when the\n`format` parameter is provided.\n\nThis restores the behavior prior to that PR (we still send the `sort`\nbut don't include the `format` parameter). Ideally we would probably not\nsend the timestamp field at all for rollup data views since we treat\nthem as if they are non-time-based, but this would require a bit of a\nrefactor, and rollups are deprecated anyway.\n\n### Checklist\n\n- [x] [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- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n\n### Release notes\n\nFixes opening a rollup data view in Discover.\n\nCo-authored-by: Matthew Kime <matt@mattki.me>","sha":"2de4b331d334454c4b3bb17b75dcdb83207ee9f9"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/214656","number":214656,"mergeCommit":{"message":"Fix sort for rollup data views (#214656)\n\n## Summary\n\nResolves https://github.com/elastic/kibana/issues/213629.\n\nSince #163784 we have included a\n`format` parameter in the `sort` that we send to Elasticsearch. This\nworked for everything except rollup data views, which break when the\n`format` parameter is provided.\n\nThis restores the behavior prior to that PR (we still send the `sort`\nbut don't include the `format` parameter). Ideally we would probably not\nsend the timestamp field at all for rollup data views since we treat\nthem as if they are non-time-based, but this would require a bit of a\nrefactor, and rollups are deprecated anyway.\n\n### Checklist\n\n- [x] [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- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n\n### Release notes\n\nFixes opening a rollup data view in Discover.\n\nCo-authored-by: Matthew Kime <matt@mattki.me>","sha":"2de4b331d334454c4b3bb17b75dcdb83207ee9f9"}}]}] BACKPORT--> Co-authored-by: Lukas Olson <lukas@elastic.co>
kibanamachine
added a commit
that referenced
this pull request
Mar 20, 2025
# Backport This will backport the following commits from `main` to `8.x`: - [Fix sort for rollup data views (#214656)](#214656) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Lukas Olson","email":"lukas@elastic.co"},"sourceCommit":{"committedDate":"2025-03-18T17:17:53Z","message":"Fix sort for rollup data views (#214656)\n\n## Summary\n\nResolves https://github.com/elastic/kibana/issues/213629.\n\nSince #163784 we have included a\n`format` parameter in the `sort` that we send to Elasticsearch. This\nworked for everything except rollup data views, which break when the\n`format` parameter is provided.\n\nThis restores the behavior prior to that PR (we still send the `sort`\nbut don't include the `format` parameter). Ideally we would probably not\nsend the timestamp field at all for rollup data views since we treat\nthem as if they are non-time-based, but this would require a bit of a\nrefactor, and rollups are deprecated anyway.\n\n### Checklist\n\n- [x] [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- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n\n### Release notes\n\nFixes opening a rollup data view in Discover.\n\nCo-authored-by: Matthew Kime <matt@mattki.me>","sha":"2de4b331d334454c4b3bb17b75dcdb83207ee9f9","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Search","release_note:fix","Feature:Data Views","Feature:Rollups","Team:DataDiscovery","backport:all-open","v9.1.0"],"title":"Fix sort for rollup data views","number":214656,"url":"https://github.com/elastic/kibana/pull/214656","mergeCommit":{"message":"Fix sort for rollup data views (#214656)\n\n## Summary\n\nResolves https://github.com/elastic/kibana/issues/213629.\n\nSince #163784 we have included a\n`format` parameter in the `sort` that we send to Elasticsearch. This\nworked for everything except rollup data views, which break when the\n`format` parameter is provided.\n\nThis restores the behavior prior to that PR (we still send the `sort`\nbut don't include the `format` parameter). Ideally we would probably not\nsend the timestamp field at all for rollup data views since we treat\nthem as if they are non-time-based, but this would require a bit of a\nrefactor, and rollups are deprecated anyway.\n\n### Checklist\n\n- [x] [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- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n\n### Release notes\n\nFixes opening a rollup data view in Discover.\n\nCo-authored-by: Matthew Kime <matt@mattki.me>","sha":"2de4b331d334454c4b3bb17b75dcdb83207ee9f9"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/214656","number":214656,"mergeCommit":{"message":"Fix sort for rollup data views (#214656)\n\n## Summary\n\nResolves https://github.com/elastic/kibana/issues/213629.\n\nSince #163784 we have included a\n`format` parameter in the `sort` that we send to Elasticsearch. This\nworked for everything except rollup data views, which break when the\n`format` parameter is provided.\n\nThis restores the behavior prior to that PR (we still send the `sort`\nbut don't include the `format` parameter). Ideally we would probably not\nsend the timestamp field at all for rollup data views since we treat\nthem as if they are non-time-based, but this would require a bit of a\nrefactor, and rollups are deprecated anyway.\n\n### Checklist\n\n- [x] [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- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n\n### Release notes\n\nFixes opening a rollup data view in Discover.\n\nCo-authored-by: Matthew Kime <matt@mattki.me>","sha":"2de4b331d334454c4b3bb17b75dcdb83207ee9f9"}}]}] BACKPORT--> Co-authored-by: Lukas Olson <lukas@elastic.co>
clintandrewhall
pushed a commit
to clintandrewhall/kibana
that referenced
this pull request
Mar 20, 2025
## Summary Resolves elastic#213629. Since elastic#163784 we have included a `format` parameter in the `sort` that we send to Elasticsearch. This worked for everything except rollup data views, which break when the `format` parameter is provided. This restores the behavior prior to that PR (we still send the `sort` but don't include the `format` parameter). Ideally we would probably not send the timestamp field at all for rollup data views since we treat them as if they are non-time-based, but this would require a bit of a refactor, and rollups are deprecated anyway. ### Checklist - [x] [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 - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed ### Release notes Fixes opening a rollup data view in Discover. Co-authored-by: Matthew Kime <matt@mattki.me>
CAWilson94
pushed a commit
to CAWilson94/kibana
that referenced
this pull request
Mar 22, 2025
## Summary Resolves elastic#213629. Since elastic#163784 we have included a `format` parameter in the `sort` that we send to Elasticsearch. This worked for everything except rollup data views, which break when the `format` parameter is provided. This restores the behavior prior to that PR (we still send the `sort` but don't include the `format` parameter). Ideally we would probably not send the timestamp field at all for rollup data views since we treat them as if they are non-time-based, but this would require a bit of a refactor, and rollups are deprecated anyway. ### Checklist - [x] [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 - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed ### Release notes Fixes opening a rollup data view in Discover. Co-authored-by: Matthew Kime <matt@mattki.me>
cqliu1
pushed a commit
to cqliu1/kibana
that referenced
this pull request
Mar 31, 2025
## Summary Resolves elastic#213629. Since elastic#163784 we have included a `format` parameter in the `sort` that we send to Elasticsearch. This worked for everything except rollup data views, which break when the `format` parameter is provided. This restores the behavior prior to that PR (we still send the `sort` but don't include the `format` parameter). Ideally we would probably not send the timestamp field at all for rollup data views since we treat them as if they are non-time-based, but this would require a bit of a refactor, and rollups are deprecated anyway. ### Checklist - [x] [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 - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed ### Release notes Fixes opening a rollup data view in Discover. Co-authored-by: Matthew Kime <matt@mattki.me>
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Warning
Sorry, I had to recreate the PR #157241
Please submit your review again.
Per docs https://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html

Summary
search_afterpagination fordate_nanostime fields.sortvalue will be returned from ES as a string instead of a rounded and incorrect timestamp. This change allows to also simplify logic on Surrounding document page.Before:

After:

"Load more" demo:

If refresh interval is on, the button becomes disabled:

Date nanos demo:

100x Flaky test runner https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2801