Skip to content

[ES|QL][Discover] Supports filtering for multivalue fields#245554

Merged
stratoula merged 9 commits intoelastic:mainfrom
stratoula:support-multivalue-charts
Dec 11, 2025
Merged

[ES|QL][Discover] Supports filtering for multivalue fields#245554
stratoula merged 9 commits intoelastic:mainfrom
stratoula:support-multivalue-charts

Conversation

@stratoula
Copy link
Contributor

@stratoula stratoula commented Dec 8, 2025

Summary

Closes #195748

Enables filtering for multi value fields in Discover. We need to use the MATCH function. It also negates with the NOT operator.

meow

Checklist

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved them in a folder

@stratoula stratoula added v9.3.0 release_note:enhancement Feature:Discover Discover Application Team:ESQL ES|QL related features in Kibana t// backport:skip This PR does not require backporting Feature:ES|QL ES|QL related features in Kibana labels Dec 9, 2025
@stratoula stratoula marked this pull request as ready for review December 9, 2025 14:01
@stratoula stratoula requested review from a team as code owners December 9, 2025 14:01
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-esql (Team:ESQL)

);
}

return appendToESQLQuery(baseESQLQuery, `AND ${filterExpression}`);
Copy link
Contributor

Choose a reason for hiding this comment

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

If you have already a WHERE in the query, and it's not the last command, if you filter it results into an invalid query:

Image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This bug was not created by this PR. It exists in main too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I decided to fix it here 542e111 as we are close to the FF

Copy link
Contributor

@sddonne sddonne left a comment

Choose a reason for hiding this comment

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

LGTM!

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #38 / alerting api integration security and spaces enabled - Group 2 testtest Connectors webhook action OAuth2 client credentials should refresh the token once the previous one has expired

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
console 258 260 +2
controls 419 421 +2
dashboard 974 976 +2
data 515 517 +2
datasetQuality 973 975 +2
dataVisualizer 854 856 +2
discover 1869 1871 +2
esql 521 523 +2
eventAnnotationListing 594 596 +2
infra 1748 1750 +2
lens 1646 1648 +2
lists 357 359 +2
maps 1304 1306 +2
ml 4188 4190 +2
observability 1633 1635 +2
observabilityAIAssistantApp 773 775 +2
onechat 1538 1540 +2
securitySolution 8504 8506 +2
slo 1329 1331 +2
stackAlerts 256 258 +2
streamsApp 1151 1153 +2
triggersActionsUi 1108 1110 +2
unifiedDocViewer 764 766 +2
unifiedSearch 549 551 +2
total +48

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/esql-utils 130 123 -7

Async chunks

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

id before after diff
cloudSecurityPosture 652.0KB 651.6KB -405.0B
data 24.6KB 26.0KB +1.4KB
discover 1.3MB 1.3MB +1.3KB
esql 683.6KB 683.2KB -401.0B
esqlDataGrid 150.4KB 150.0KB -405.0B
securitySolution 11.1MB 11.1MB -405.0B
slo 994.7KB 994.3KB -405.0B
total +693.0B

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
@kbn/esql-utils 3 4 +1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
data 442.1KB 442.1KB -3.0B

History

@stratoula stratoula enabled auto-merge (squash) December 11, 2025 06:20
@stratoula stratoula merged commit 1f9e52e into elastic:main Dec 11, 2025
12 checks passed
seanrathier pushed a commit to seanrathier/kibana that referenced this pull request Dec 15, 2025
…45554)

## Summary

Closes elastic#195748

Enables filtering for multi value fields in Discover. We need to use the
MATCH function. It also negates with the NOT operator.


![meow](https://github.com/user-attachments/assets/a3afd07a-082a-4602-a8dd-4fc6789e8e33)



### Checklist

- [ ] [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
@jughosta
Copy link
Contributor

Saw this in the email updates and realized that the doc viewer would need to allow them too. I will make changes in #250212 if that's okay with you.

@stratoula
Copy link
Contributor Author

Apparently I always forget the doc viewer 😄 Thanks Julia!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Feature:Discover Discover Application Feature:ES|QL ES|QL related features in Kibana needs_docs release_note:enhancement Team:ESQL ES|QL related features in Kibana t// v9.3.0

6 participants