An introduction to full-text searching
The simplest way to search for or retrieve a document is typically to match the search term or text with values in your index or datastore. In Elasticsearch, this type of search happens on keyword fields using term-level queries. As we saw in Chapter 3, Indexing and Searching for Data, term-level queries are useful when you know precisely what you're looking for. A full list of query options is available in the reference guide:
https://www.elastic.co/guide/en/elasticsearch/reference/8.0/term-level-queries.html
For example, if a user wanted to retrieve all recipes written by one or more authors, term-level queries can do the job quickly and efficiently:
GET recipes/_search { "query": { "terms": { "author": [ "Staff", "Jim...