Depending on what kind of query you use, this analysis can also be applied to the search text before the search is performed against the index. In particular, queries such as the match and match_phrase queries perform analysis before searching, and queries like the term and terms query do not. It’s important to keep this in mind when debugging why a particular search matches or doesn’t match a document—it might be analyzed differently than what you expect! There’s even a configuration option to configure a different analyzer for the searched text than for the indexed text. More on this when we discuss the ngram analyzer. Check section 4.2.1 for more details on the match and term queries.

Now that you have an understanding of what goes on during Elasticsearch’s analysis phase, let’s talk about how analyzers are specified for fields in your mapping and how custom analyzers are specified.