While building complex queries, some typical Boolean operation filters are required, as they allow to construct complex filter relations as in traditional relational world.
Every DSL query cannot be completed if there isn't an and, or, and not filter.
You need a working ElasticSearch cluster and the data populated with the populate script.
For executing and/or/not, we need to perform the following steps:
Searching documents with
parsedtext
equal tojoe
anduuid
equal to11111
is done by using the following code:curl -XPOST 'http://127.0.0.1:9200/test-index/test-type/_search' -d '{ "query": { "filtered": { "filter": { "and": [ { "term": { "parsedtext":"joe" } }, { "term": { "uuid":"11111" } ...