OpenSearch/docs/reference/query-dsl/and-query.asciidoc
Adrien Grand a0af88e996 Query DSL: Remove filter parsers.
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`.
2015-05-07 20:14:34 +02:00

35 lines
808 B
Plaintext

[[query-dsl-and-query]]
== And Query
deprecated[2.0.0, Use the `bool` query instead]
A query that matches documents using the `AND` boolean operator on other
queries.
[source,js]
--------------------------------------------------
{
"filtered" : {
"query" : {
"term" : { "name.first" : "shay" }
},
"filter" : {
"and" : [
{
"range" : {
"postDate" : {
"from" : "2010-03-01",
"to" : "2010-04-01"
}
}
},
{
"prefix" : { "name.second" : "ba" }
}
]
}
}
}
--------------------------------------------------