mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-08 05:58:44 +00:00
a0af88e996
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`.
30 lines
641 B
Plaintext
30 lines
641 B
Plaintext
[[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" }
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
--------------------------------------------------
|
|
|