The match keyword

There are four kinds of queries under the match keyword:

  • match: The query string is tokenized into tokens to match the search text fields and then a Boolean operator, and|or (default = or), logically groups all matches to compute the final result. Let's look at an example of using the default operator, or , to find the ETFs with the fund_name field that contains either one, ishares or global word. The following screenshot shows that there are 75 hits in total:

Another example is to use the operator parameter with the and option to find the ETFs with the fund_name field that contains both words. The following screenshot ...

Get Advanced Elasticsearch 7.0 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.