October 2019
Beginner
186 pages
5h 39m
English
When building a search query, stemming is a necessary component. Stemming is the process of reducing words to their root form—as shown throughout the examples in Chapter 3, Many as One – the Distributed Model. For example, when looking for paid, your search may return pay, paid, and paying. To be able to return the word paid specifically, we can use a multi-field. I have explained multi-fields in Chapter 4, Prepping Your Data – Text Analysis and Mapping. In the following example, we are creating the index with the english analyzer:
PUT index{ "settings": { "analysis": { "analyzer": { "english_exact": { "tokenizer": "standard", "filter": [ "lowercase" ] } } } }, "mappings": { "properties": { "body": { "type": ...Read now
Unlock full access