In the previous chapter, we discussed different ways to query documents based on the user search input. But the search input might contain typos and spelling mistakes. Automatically correcting the user's spelling mistakes and typos improves the overall search experience. The term or match query that we discussed in the previous chapter only looks for the exact term in the inverted index. In this section, we will discuss different types of queries Elasticsearch provides to correct the typos.
Correcting typos and spelling mistakes
Fuzzy query
The fuzzy query is provided to look for terms that are close to the original term. It looks for terms in the inverted index, which are like the query term based on the edit distance...