Boolean operations

Now, let's examine some awesome examples combining all the searches:

Query = "india OR asia AND NOT china"

As you can see, we utilize Boolean operators such as AND, OR, and NOT and use them to mark Boolean conditions in our query.

As the query string query is very powerful and has a high chance of failure because of the complex formats it supports, it's highly advised that you do not expose this to the end users who are not aware of these operations. The simple query string query is a simplified version of the query string query and supports some of its operations.

Get Elasticsearch Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.