-
Book Overview & Buying
-
Table Of Contents
The Definitive Guide to OpenSearch
By :
OpenSearch queries fall into two kinds—leaf queries and compound queries. Leaf queries specify fields and values to match. You’ve seen examples of leaf queries previously, such as simple_query_string, match, and match_all. Compound queries, which we’ll cover in Chapter 6, allow you to nest multiple leaf or compound queries to build the logic you need to bring back the right results. For the present, we’ll dive into leaf queries to explore the kinds of single-field matching that OpenSearch supports.
We can further break down leaf queries into text queries and term queries. You use text queries for fields that are of the text type, where the text has been analyzed, and the query should also be analyzed for matching. You use term queries when you want to match terms exactly.
The data that we’ve provided contains 100,000 movies. Refer back to the previous section to review the mapping (or have another look at load.py). Since we’...