elastic/elasticsearch
View on GitHubES|QL: Push down mv_contains as a lucene query
Open
#134,529 opened on Sep 11, 2025
:Analytics/ES|QL>enhancementTeam:Analyticsgood first issue
Repository metrics
- Stars
- (76,700 stars)
- PR merge metrics
- (Avg merge 2d 5h) (1,000 merged PRs in 30d)
Description
In some cases we can push down mv_contains as a lucene query.
We could use for example, the terms_set query.
As an example:
from job-candidates
| WHERE mv_contains(programming_languages, ["java", "jruby"])
can be pushed down as:
{
"query": {
"terms_set": {
"programming_languages": {
"terms": [ "java", "jruby" ],
"minimum_should_match": 2
}
}
}
}