# Fuzzy queries relevance score detailed explanation

**URL:** <https://discuss.elastic.co/t/fuzzy-queries-relevance-score-detailed-explanation/39597>\
**Category:** Elasticsearch\
**Created:** [January 19, 2016, 9:06pm UTC](https://discuss.elastic.co/t/fuzzy-queries-relevance-score-detailed-explanation/39597 "2016-01-19T21:06:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![full\_vlad](https://avatars.discourse-cdn.com/v4/letter/f/eb8c5e/32.png) [@full\_vlad](https://discuss.elastic.co/u/full_vlad)\
**Post date:** [January 19, 2016, 9:06pm UTC](https://discuss.elastic.co/t/fuzzy-queries-relevance-score-detailed-explanation/39597/1 "2016-01-19T21:06:29Z")

</div>

In what step of the relevance scoring phase do fuzzy-queries apply the Levenstein formula?

I am asking this because I read [here](https://www.elastic.co/guide/en/elasticsearch/guide/master/scoring-theory.html) that the steps for relevance scoring include **TF-IDF** , **vector space model** and other features like a coordination factor, field length normalization, and term or query clause boosting.

Where exactly does applying Levenstein (or Damerau-Levenstein) occur and **most importantly** , where does the **fuzziness** come from? What is actually fuzzy about fuzzy queries? Is it related to fuzzy logic in any way?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [January 20, 2016, 10:56am UTC](https://discuss.elastic.co/t/fuzzy-queries-relevance-score-detailed-explanation/39597/2 "2016-01-20T10:56:52Z")

</div>

Fuzzy queries take a single user-provided term and produce several Lucene TermQuery variants, each of which are boosted with a score that reflects the edit distance (the boost for a non-fuzzy query term is usually 1.0 i.e. no boosting effect.). This used to be mixed in with the usual Lucene IDF ranking but to ill effect [1]. Modern versions of fuzzy query now "lie" about document frequencies of the auto-expanded term variants to prevent IDF issues like this one linked.

[1] [When searching for 'Boss' with fuzziness, get higher score for 'Bose' than 'Boss'. ? How Comes !?!?](https://discuss.elastic.co/t/when-searching-for-boss-with-fuzziness-get-higher-score-for-bose-than-boss-how-comes/21662/8)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:23pm UTC](https://discuss.elastic.co/t/fuzzy-queries-relevance-score-detailed-explanation/39597/3 "2017-07-05T23:23:03Z")

</div>


