August 2019
Intermediate to advanced
560 pages
13h 41m
English
The _name parameter gives you a way to name your queries so that you can use the name of the query as an identifier in the hit. In the following example, the _name parameter seems to only make sense for the bool query that allows the partial matching of queries, such as a should clause.
Let's look at an example of finding the description field containing the keyword Asia, USA, or Europe. However, we want to report matching keywords in the hit. Okay! We can issue a bool query with a should clause, where each query is named for a region. In the following screenshot, you can see the matched_queries field in the response body to report the queries to which the hit corresponds:
Read now
Unlock full access