Skip to content

Fix sort for rollup data views#214656

Merged
lukasolson merged 2 commits intoelastic:mainfrom
lukasolson:fix_rollup_search_sort
Mar 18, 2025
Merged

Fix sort for rollup data views#214656
lukasolson merged 2 commits intoelastic:mainfrom
lukasolson:fix_rollup_search_sort

Conversation

@lukasolson
Copy link
Contributor

@lukasolson lukasolson commented Mar 14, 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

Release notes

Fixes opening a rollup data view in Discover.

@lukasolson lukasolson added Feature:Search Querying infrastructure in Kibana Feature:Data Views Data Views code and UI - index patterns before 8.0 Feature:Rollups Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// backport:all-open Backport to all branches that could still receive a release labels Mar 14, 2025
@lukasolson lukasolson self-assigned this Mar 14, 2025
@elasticmachine
Copy link
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
discover 961.0KB 961.0KB +42.0B

cc @lukasolson

@lukasolson lukasolson marked this pull request as ready for review March 17, 2025 18:24
@lukasolson lukasolson requested a review from a team as a code owner March 17, 2025 18:24
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

Copy link
Contributor

@mattkime mattkime left a comment

Choose a reason for hiding this comment

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

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.

Copy link
Contributor

@jughosta jughosta left a comment

Choose a reason for hiding this comment

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

Thanks, Lukas, for fixing the issue which I missed in #163784!

@lukasolson lukasolson merged commit 2de4b33 into elastic:main Mar 18, 2025
12 checks passed
@kibanamachine
Copy link
Contributor

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

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
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
7.17 Backport failed because of merge conflicts
8.16
8.17
8.18
8.x
9.0

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

Manual backport

To create the backport manually run:

node scripts/backport --pr 214656

Questions ?

Please refer to the Backport tool documentation

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 kibanamachine added v8.17.4 backport missing Added to PRs automatically when the are determined to be missing a backport. labels Mar 18, 2025
@kibanamachine
Copy link
Contributor

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.

@lukasolson lukasolson removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Mar 19, 2025
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>
mattkime added a commit that referenced this pull request Apr 14, 2025
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>
mattkime added a commit that referenced this pull request Apr 21, 2025
…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
pgayvallet pushed a commit to pgayvallet/kibana that referenced this pull request Apr 22, 2025
…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
akowalska622 pushed a commit to akowalska622/kibana that referenced this pull request May 29, 2025
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:all-open Backport to all branches that could still receive a release Feature:Data Views Data Views code and UI - index patterns before 8.0 Feature:Rollups Feature:Search Querying infrastructure in Kibana release_note:fix Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// v8.16.6 v8.17.4 v8.18.0 v8.19.0 v9.0.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error in Discover when searching using a rollup data view

5 participants