Fix sort for rollup data views#214656
Conversation
💚 Build Succeeded
Metrics [docs]Async chunks
cc @lukasolson |
|
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
mattkime
left a comment
There was a problem hiding this comment.
changes look good and work well!
As a follow up - it would be good to create a functional test that ensures a discover query can be executed against a rollup index.
|
Starting backport for target branches: 7.17, 8.16, 8.17, 8.18, 8.x, 9.0 https://github.com/elastic/kibana/actions/runs/13929448439 |
## 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)
## 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)
## 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)
## 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)
## 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)
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
# 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>
# 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>
# 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>
# 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>
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
# 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>
## 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>
## 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>
## 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>
This PR improve support for rollup indices. Rollup indices can be handled like normal indices but jobs should be stopped before reindexing begins or index is marked read only. Also handles case where the rollup job is already stopped. To review: Mark the following read only and make sure rollup jobs are handled as appropriate: Rollup index with and without job running, normal index. Follow up to #212592 and #214656 Closes: #211850 --------- Co-authored-by: Ignacio Rivas <rivasign@gmail.com>
…to 9.1 (#218049) ## Summary forward port of #212815 --- This PR improve support for rollup indices. Rollup indices can be handled like normal indices but jobs should be stopped before reindexing begins or index is marked read only. Also handles case where the rollup job is already stopped. To review: Mark the following read only and make sure rollup jobs are handled as appropriate: Rollup index with and without job running, normal index. Follow up to #212592 and #214656 Closes: #211850
…to 9.1 (elastic#218049) ## Summary forward port of elastic#212815 --- This PR improve support for rollup indices. Rollup indices can be handled like normal indices but jobs should be stopped before reindexing begins or index is marked read only. Also handles case where the rollup job is already stopped. To review: Mark the following read only and make sure rollup jobs are handled as appropriate: Rollup index with and without job running, normal index. Follow up to elastic#212592 and elastic#214656 Closes: elastic#211850
…to 9.1 (elastic#218049) ## Summary forward port of elastic#212815 --- This PR improve support for rollup indices. Rollup indices can be handled like normal indices but jobs should be stopped before reindexing begins or index is marked read only. Also handles case where the rollup job is already stopped. To review: Mark the following read only and make sure rollup jobs are handled as appropriate: Rollup index with and without job running, normal index. Follow up to elastic#212592 and elastic#214656 Closes: elastic#211850
Summary
Resolves #213629.
Since #163784 we have included a
formatparameter in thesortthat we send to Elasticsearch. This worked for everything except rollup data views, which break when theformatparameter is provided.This restores the behavior prior to that PR (we still send the
sortbut don't include theformatparameter). 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
Release notes
Fixes opening a rollup data view in Discover.