We are working on updating this book for the latest version. Some content might be out of date.
Imagine that we have 1,000 documents containing “Schwarzenegger,” and just one document with the misspelling “Schwarzeneger.” According to the theory of term frequency/inverse document frequency, the misspelling is much more relevant than the correct spelling, because it appears in far fewer documents!
Fuzzy matching should not be used for scoring purposes—only to widen the net of matching terms in case there are misspellings.
By default, the
match query gives all fuzzy matches the constant score of 1.
This is sufficient to add potential matches onto the end of the result list,
without interfering with the relevance scoring of nonfuzzy queries.