Skip to content

[Discover] Disable sorting for json-like fields in ES|QL mode#231289

Merged
jughosta merged 4 commits intoelastic:mainfrom
jughosta:231280-fix-esql-sorting
Aug 14, 2025
Merged

[Discover] Disable sorting for json-like fields in ES|QL mode#231289
jughosta merged 4 commits intoelastic:mainfrom
jughosta:231280-fix-esql-sorting

Conversation

@jughosta
Copy link
Contributor

@jughosta jughosta commented Aug 11, 2025

Summary

This PR disables sorting for json-like fields in ES|QL mode.

Before:
Screenshot 2025-08-11 at 13 31 57

After:
Screenshot 2025-08-11 at 14 35 10

Checklist

  • Unit or functional tests were updated or added to match the most common scenarios
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.
@jughosta jughosta self-assigned this Aug 11, 2025
@jughosta jughosta added release_note:fix Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// backport:version Backport to applied version labels v9.0.5 v9.1.2 v8.19.2 labels Aug 11, 2025
Comment on lines +135 to +141
return Boolean(
columnSchema !== kibanaJSON ||
(dataViewField?.type &&
Object.values(NonStringSortableFieldType).includes(
dataViewField.type as NonStringSortableFieldType
))
);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@stratoula Would you advise to exclude only geo fields instead? Can't decide if it should check for any json-like fields excluding the ones which are handled separately. Or it should exclude only geo fields explicitly. What would be safer? We used to disable sorting only for _source in ES|QL mode.

Copy link
Contributor

Choose a reason for hiding this comment

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

I would go with any json-like fields Jul

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! Then I will keep these changes.

@jughosta jughosta marked this pull request as ready for review August 12, 2025 13:51
@jughosta jughosta requested review from a team as code owners August 12, 2025 13:51
@elasticmachine
Copy link
Contributor

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

@jughosta jughosta requested a review from a team August 12, 2025 13:51
Copy link
Contributor

@stratoula stratoula left a comment

Choose a reason for hiding this comment

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

This works great, thanx Jul!

dataViewField: DataViewField | undefined;
}): boolean => {
if (isPlainRecord) {
// TODO: would be great to have something like `sortable` flag for text based columns too
Copy link
Contributor

Choose a reason for hiding this comment

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

💯

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #11 / should render status information
  • [job] [logs] FTR Configs #102 / Observability AI Assistant Functional tests knowledge_base_management/index.spec.ts Knowledge management tab User instruction management creates a new user instruction

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/sort-predicates 4 5 +1

Async chunks

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

id before after diff
cloudSecurityPosture 557.0KB 557.3KB +319.0B
discover 1.1MB 1.1MB +304.0B
esqlDataGrid 144.5KB 144.8KB +317.0B
lens 1.5MB 1.5MB +117.0B
securitySolution 10.4MB 10.4MB +317.0B
slo 968.5KB 968.8KB +319.0B
total +1.7KB
Unknown metric groups

API count

id before after diff
@kbn/sort-predicates 4 5 +1

History

cc @jughosta

Copy link
Contributor

@akowalska622 akowalska622 left a comment

Choose a reason for hiding this comment

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

Good job, code looks good and works as expected 🚀

Comment on lines -248 to +270
if (type === 'date') {
if (type === NonStringSortableFieldType.date) {
return getUndefinedHandler(sortBy, arrayValueHandler(dateCompare));
}
if (type === 'number') {
if (type === NonStringSortableFieldType.number) {
return getUndefinedHandler(sortBy, arrayValueHandler(numberCompare));
}
// this is a custom type, and can safely assume the gte and lt fields are all numbers or undefined
if (type === 'range') {
if (type === NonStringSortableFieldType.range) {
return getUndefinedHandler(sortBy, arrayValueHandler(rangeComparison));
}
// IP have a special sorting
if (type === 'ip') {
if (type === NonStringSortableFieldType.ip) {
return getUndefinedHandler(sortBy, arrayValueHandler(ipComparison));
}
if (type === 'version') {
if (type === NonStringSortableFieldType.version) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I love the enum refactor, huge fan of this approach ❤️

@jughosta jughosta merged commit 63b2603 into elastic:main Aug 14, 2025
21 checks passed
@jughosta jughosta deleted the 231280-fix-esql-sorting branch August 14, 2025 11:48
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19, 9.0, 9.1

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

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.19 Backport failed because of merge conflicts
9.0 Backport failed because of merge conflicts
9.1 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 231289

Questions ?

Please refer to the Backport tool documentation

jughosta added a commit to jughosta/kibana that referenced this pull request Aug 14, 2025
…c#231289)

- Closes elastic#231280

## Summary

This PR disables sorting for json-like fields in ES|QL mode.

Before:
<img width="696" height="245" alt="Screenshot 2025-08-11 at 13 31 57"
src="https://github.com/user-attachments/assets/74e2f23f-3d4b-4215-b047-e9224db46c76"
/>

After:
<img width="725" height="294" alt="Screenshot 2025-08-11 at 14 35 10"
src="https://github.com/user-attachments/assets/f79f3129-5ccc-4a19-8bc0-93df4da01345"
/>

### 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
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

(cherry picked from commit 63b2603)

# Conflicts:
#	src/platform/packages/shared/kbn-unified-data-table/src/components/data_table_columns.tsx
@jughosta
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
9.1
9.0
8.19

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

Questions ?

Please refer to the Backport tool documentation

jughosta added a commit to jughosta/kibana that referenced this pull request Aug 14, 2025
…c#231289)

- Closes elastic#231280

## Summary

This PR disables sorting for json-like fields in ES|QL mode.

Before:
<img width="696" height="245" alt="Screenshot 2025-08-11 at 13 31 57"
src="https://github.com/user-attachments/assets/74e2f23f-3d4b-4215-b047-e9224db46c76"
/>

After:
<img width="725" height="294" alt="Screenshot 2025-08-11 at 14 35 10"
src="https://github.com/user-attachments/assets/f79f3129-5ccc-4a19-8bc0-93df4da01345"
/>

### 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
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

(cherry picked from commit 63b2603)

# Conflicts:
#	src/platform/packages/shared/kbn-unified-data-table/src/components/data_table_columns.tsx
jughosta added a commit to jughosta/kibana that referenced this pull request Aug 14, 2025
…c#231289)

- Closes elastic#231280

## Summary

This PR disables sorting for json-like fields in ES|QL mode.

Before:
<img width="696" height="245" alt="Screenshot 2025-08-11 at 13 31 57"
src="https://github.com/user-attachments/assets/74e2f23f-3d4b-4215-b047-e9224db46c76"
/>

After:
<img width="725" height="294" alt="Screenshot 2025-08-11 at 14 35 10"
src="https://github.com/user-attachments/assets/f79f3129-5ccc-4a19-8bc0-93df4da01345"
/>

### 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
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

(cherry picked from commit 63b2603)

# Conflicts:
#	src/platform/packages/shared/kbn-unified-data-table/src/components/data_table_columns.tsx
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Aug 15, 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.
cc: @jughosta

jughosta added a commit that referenced this pull request Aug 18, 2025
…231289) (#231857)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[Discover] Disable sorting for json-like fields in ES|QL mode
(#231289)](#231289)

<!--- Backport version: 10.0.1 -->

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

<!--BACKPORT [{"author":{"name":"Julia
Rechkunova","email":"julia.rechkunova@elastic.co"},"sourceCommit":{"committedDate":"2025-08-14T11:47:56Z","message":"[Discover]
Disable sorting for json-like fields in ES|QL mode (#231289)\n\n- Closes
https://github.com/elastic/kibana/issues/231280\n\n## Summary\n\nThis PR
disables sorting for json-like fields in ES|QL mode.\n\nBefore:\n<img
width=\"696\" height=\"245\" alt=\"Screenshot 2025-08-11 at 13 31
57\"\nsrc=\"https://github.com/user-attachments/assets/74e2f23f-3d4b-4215-b047-e9224db46c76\"\n/>\n\nAfter:\n<img
width=\"725\" height=\"294\" alt=\"Screenshot 2025-08-11 at 14 35
10\"\nsrc=\"https://github.com/user-attachments/assets/f79f3129-5ccc-4a19-8bc0-93df4da01345\"\n/>\n\n\n\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- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"63b260336e13c699560739b8c3fe0181a22c807b","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:DataDiscovery","backport:version","v9.2.0","v9.1.3","v8.19.3","v9.0.6"],"title":"[Discover]
Disable sorting for json-like fields in ES|QL
mode","number":231289,"url":"https://github.com/elastic/kibana/pull/231289","mergeCommit":{"message":"[Discover]
Disable sorting for json-like fields in ES|QL mode (#231289)\n\n- Closes
https://github.com/elastic/kibana/issues/231280\n\n## Summary\n\nThis PR
disables sorting for json-like fields in ES|QL mode.\n\nBefore:\n<img
width=\"696\" height=\"245\" alt=\"Screenshot 2025-08-11 at 13 31
57\"\nsrc=\"https://github.com/user-attachments/assets/74e2f23f-3d4b-4215-b047-e9224db46c76\"\n/>\n\nAfter:\n<img
width=\"725\" height=\"294\" alt=\"Screenshot 2025-08-11 at 14 35
10\"\nsrc=\"https://github.com/user-attachments/assets/f79f3129-5ccc-4a19-8bc0-93df4da01345\"\n/>\n\n\n\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- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"63b260336e13c699560739b8c3fe0181a22c807b"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19","9.0"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/231289","number":231289,"mergeCommit":{"message":"[Discover]
Disable sorting for json-like fields in ES|QL mode (#231289)\n\n- Closes
https://github.com/elastic/kibana/issues/231280\n\n## Summary\n\nThis PR
disables sorting for json-like fields in ES|QL mode.\n\nBefore:\n<img
width=\"696\" height=\"245\" alt=\"Screenshot 2025-08-11 at 13 31
57\"\nsrc=\"https://github.com/user-attachments/assets/74e2f23f-3d4b-4215-b047-e9224db46c76\"\n/>\n\nAfter:\n<img
width=\"725\" height=\"294\" alt=\"Screenshot 2025-08-11 at 14 35
10\"\nsrc=\"https://github.com/user-attachments/assets/f79f3129-5ccc-4a19-8bc0-93df4da01345\"\n/>\n\n\n\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- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"63b260336e13c699560739b8c3fe0181a22c807b"}},{"branch":"9.1","label":"v9.1.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.6","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
jughosta added a commit that referenced this pull request Aug 18, 2025
…231289) (#231858)

# Backport

This will backport the following commits from `main` to `9.0`:
- [[Discover] Disable sorting for json-like fields in ES|QL mode
(#231289)](#231289)

<!--- Backport version: 10.0.1 -->

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

<!--BACKPORT [{"author":{"name":"Julia
Rechkunova","email":"julia.rechkunova@elastic.co"},"sourceCommit":{"committedDate":"2025-08-14T11:47:56Z","message":"[Discover]
Disable sorting for json-like fields in ES|QL mode (#231289)\n\n- Closes
https://github.com/elastic/kibana/issues/231280\n\n## Summary\n\nThis PR
disables sorting for json-like fields in ES|QL mode.\n\nBefore:\n<img
width=\"696\" height=\"245\" alt=\"Screenshot 2025-08-11 at 13 31
57\"\nsrc=\"https://github.com/user-attachments/assets/74e2f23f-3d4b-4215-b047-e9224db46c76\"\n/>\n\nAfter:\n<img
width=\"725\" height=\"294\" alt=\"Screenshot 2025-08-11 at 14 35
10\"\nsrc=\"https://github.com/user-attachments/assets/f79f3129-5ccc-4a19-8bc0-93df4da01345\"\n/>\n\n\n\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- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"63b260336e13c699560739b8c3fe0181a22c807b","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:DataDiscovery","backport:version","v9.2.0","v9.1.3","v8.19.3","v9.0.6"],"title":"[Discover]
Disable sorting for json-like fields in ES|QL
mode","number":231289,"url":"https://github.com/elastic/kibana/pull/231289","mergeCommit":{"message":"[Discover]
Disable sorting for json-like fields in ES|QL mode (#231289)\n\n- Closes
https://github.com/elastic/kibana/issues/231280\n\n## Summary\n\nThis PR
disables sorting for json-like fields in ES|QL mode.\n\nBefore:\n<img
width=\"696\" height=\"245\" alt=\"Screenshot 2025-08-11 at 13 31
57\"\nsrc=\"https://github.com/user-attachments/assets/74e2f23f-3d4b-4215-b047-e9224db46c76\"\n/>\n\nAfter:\n<img
width=\"725\" height=\"294\" alt=\"Screenshot 2025-08-11 at 14 35
10\"\nsrc=\"https://github.com/user-attachments/assets/f79f3129-5ccc-4a19-8bc0-93df4da01345\"\n/>\n\n\n\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- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"63b260336e13c699560739b8c3fe0181a22c807b"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19","9.0"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/231289","number":231289,"mergeCommit":{"message":"[Discover]
Disable sorting for json-like fields in ES|QL mode (#231289)\n\n- Closes
https://github.com/elastic/kibana/issues/231280\n\n## Summary\n\nThis PR
disables sorting for json-like fields in ES|QL mode.\n\nBefore:\n<img
width=\"696\" height=\"245\" alt=\"Screenshot 2025-08-11 at 13 31
57\"\nsrc=\"https://github.com/user-attachments/assets/74e2f23f-3d4b-4215-b047-e9224db46c76\"\n/>\n\nAfter:\n<img
width=\"725\" height=\"294\" alt=\"Screenshot 2025-08-11 at 14 35
10\"\nsrc=\"https://github.com/user-attachments/assets/f79f3129-5ccc-4a19-8bc0-93df4da01345\"\n/>\n\n\n\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- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"63b260336e13c699560739b8c3fe0181a22c807b"}},{"branch":"9.1","label":"v9.1.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.6","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
jughosta added a commit that referenced this pull request Aug 18, 2025
…231289) (#231859)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Discover] Disable sorting for json-like fields in ES|QL mode
(#231289)](#231289)

<!--- Backport version: 10.0.1 -->

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

<!--BACKPORT [{"author":{"name":"Julia
Rechkunova","email":"julia.rechkunova@elastic.co"},"sourceCommit":{"committedDate":"2025-08-14T11:47:56Z","message":"[Discover]
Disable sorting for json-like fields in ES|QL mode (#231289)\n\n- Closes
https://github.com/elastic/kibana/issues/231280\n\n## Summary\n\nThis PR
disables sorting for json-like fields in ES|QL mode.\n\nBefore:\n<img
width=\"696\" height=\"245\" alt=\"Screenshot 2025-08-11 at 13 31
57\"\nsrc=\"https://github.com/user-attachments/assets/74e2f23f-3d4b-4215-b047-e9224db46c76\"\n/>\n\nAfter:\n<img
width=\"725\" height=\"294\" alt=\"Screenshot 2025-08-11 at 14 35
10\"\nsrc=\"https://github.com/user-attachments/assets/f79f3129-5ccc-4a19-8bc0-93df4da01345\"\n/>\n\n\n\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- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"63b260336e13c699560739b8c3fe0181a22c807b","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:DataDiscovery","backport:version","v9.2.0","v9.1.3","v8.19.3","v9.0.6"],"title":"[Discover]
Disable sorting for json-like fields in ES|QL
mode","number":231289,"url":"https://github.com/elastic/kibana/pull/231289","mergeCommit":{"message":"[Discover]
Disable sorting for json-like fields in ES|QL mode (#231289)\n\n- Closes
https://github.com/elastic/kibana/issues/231280\n\n## Summary\n\nThis PR
disables sorting for json-like fields in ES|QL mode.\n\nBefore:\n<img
width=\"696\" height=\"245\" alt=\"Screenshot 2025-08-11 at 13 31
57\"\nsrc=\"https://github.com/user-attachments/assets/74e2f23f-3d4b-4215-b047-e9224db46c76\"\n/>\n\nAfter:\n<img
width=\"725\" height=\"294\" alt=\"Screenshot 2025-08-11 at 14 35
10\"\nsrc=\"https://github.com/user-attachments/assets/f79f3129-5ccc-4a19-8bc0-93df4da01345\"\n/>\n\n\n\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- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"63b260336e13c699560739b8c3fe0181a22c807b"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19","9.0"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/231289","number":231289,"mergeCommit":{"message":"[Discover]
Disable sorting for json-like fields in ES|QL mode (#231289)\n\n- Closes
https://github.com/elastic/kibana/issues/231280\n\n## Summary\n\nThis PR
disables sorting for json-like fields in ES|QL mode.\n\nBefore:\n<img
width=\"696\" height=\"245\" alt=\"Screenshot 2025-08-11 at 13 31
57\"\nsrc=\"https://github.com/user-attachments/assets/74e2f23f-3d4b-4215-b047-e9224db46c76\"\n/>\n\nAfter:\n<img
width=\"725\" height=\"294\" alt=\"Screenshot 2025-08-11 at 14 35
10\"\nsrc=\"https://github.com/user-attachments/assets/f79f3129-5ccc-4a19-8bc0-93df4da01345\"\n/>\n\n\n\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- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"63b260336e13c699560739b8c3fe0181a22c807b"}},{"branch":"9.1","label":"v9.1.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.6","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Aug 18, 2025
NicholasPeretti pushed a commit to NicholasPeretti/kibana that referenced this pull request Aug 18, 2025
…c#231289)

- Closes elastic#231280

## Summary

This PR disables sorting for json-like fields in ES|QL mode.

Before:
<img width="696" height="245" alt="Screenshot 2025-08-11 at 13 31 57"
src="https://github.com/user-attachments/assets/74e2f23f-3d4b-4215-b047-e9224db46c76"
/>

After:
<img width="725" height="294" alt="Screenshot 2025-08-11 at 14 35 10"
src="https://github.com/user-attachments/assets/f79f3129-5ccc-4a19-8bc0-93df4da01345"
/>




### 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
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.
qn895 pushed a commit to qn895/kibana that referenced this pull request Aug 26, 2025
…c#231289)

- Closes elastic#231280

## Summary

This PR disables sorting for json-like fields in ES|QL mode.

Before:
<img width="696" height="245" alt="Screenshot 2025-08-11 at 13 31 57"
src="https://github.com/user-attachments/assets/74e2f23f-3d4b-4215-b047-e9224db46c76"
/>

After:
<img width="725" height="294" alt="Screenshot 2025-08-11 at 14 35 10"
src="https://github.com/user-attachments/assets/f79f3129-5ccc-4a19-8bc0-93df4da01345"
/>




### 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
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels release_note:fix Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// v8.19.3 v9.0.6 v9.1.3 v9.2.0

6 participants