mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-30 10:23:41 -04:00
This commit makes queries and filters parsed the same way using the QueryParser abstraction. This allowed to remove duplicate code that we had for similar queries/filters such as `range`, `prefix` or `term`.
29 lines
641 B
Text
29 lines
641 B
Text
[[query-dsl-or-query]]
|
|
== Or Query
|
|
|
|
deprecated[2.0.0, Use the `bool` query instead]
|
|
|
|
A query that matches documents using the `OR` boolean operator on other
|
|
queries.
|
|
|
|
[source,js]
|
|
--------------------------------------------------
|
|
{
|
|
"filtered" : {
|
|
"query" : {
|
|
"term" : { "name.first" : "shay" }
|
|
},
|
|
"filter" : {
|
|
"or" : [
|
|
{
|
|
"term" : { "name.second" : "banon" }
|
|
},
|
|
{
|
|
"term" : { "name.nick" : "kimchy" }
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
--------------------------------------------------
|
|
|