Answer the question
In order to leave comments, you need to log in
OR query for Elasticsearch?
How can I make a query similar to SQL for ElasticSearch?
SELECT * FROM table WHERE ( field = 1 && field2 = 2) || (field3 = 3)
{
"query": {
"bool": {
"must": [
{"term": {"field": {"value": 1}}},
{"term": {"field2": {"value": 2}}},
// OR
{"term": {"field3": {"value": 3}}}
]
}
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question