WARNING: Version 2.0 of Elasticsearch has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
And Query
editAnd Query
editDeprecated in 2.0.0-beta1.
Use the bool
query instead
A query that matches documents using the AND
boolean operator on other
queries.
{ "filtered" : { "query" : { "term" : { "name.first" : "shay" } }, "filter" : { "and" : [ { "range" : { "postDate" : { "from" : "2010-03-01", "to" : "2010-04-01" } } }, { "prefix" : { "name.second" : "ba" } } ] } } }