# Completion Suggester Sorting on Fuzziness

**URL:** <https://discuss.elastic.co/t/completion-suggester-sorting-on-fuzziness/82534>\
**Category:** Elasticsearch\
**Created:** [April 17, 2017, 7:25am UTC](https://discuss.elastic.co/t/completion-suggester-sorting-on-fuzziness/82534 "2017-04-17T07:25:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maarten\_Roosendaal](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@Maarten\_Roosendaal](https://discuss.elastic.co/u/Maarten_Roosendaal)\
**Post date:** [April 17, 2017, 7:25am UTC](https://discuss.elastic.co/t/completion-suggester-sorting-on-fuzziness/82534/1 "2017-04-17T07:25:38Z")

</div>

Hi,

I'm trying to figure out how i can sort the completion suggester when using fuzziness.

I have 4 documents

1. title: tennis
2. title: tee
3. title: teen
4. title: terrace

When people enter 'tee' and fuzziness: 1, tennis is now on top. What i want is the suggestions that still have an 'exact' match be on top, so 'tee' and 'teen' should be on top. I thought about having 2 suggestions, 1 with no fuzziness and the other with fuzziness: 1. But that requires deduplication which takes time.

Does anyone have an idea on how to do this?

using elasticsearch 5.1.1.

Thanks,  
Maarten

---

<div class="post-metadata">

**Author:** ![jkuang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jkuang/32/72637_2.png) [@jkuang](https://discuss.elastic.co/u/jkuang)\
**Post date:** [April 18, 2017, 10:48pm UTC](https://discuss.elastic.co/t/completion-suggester-sorting-on-fuzziness/82534/2 "2017-04-18T22:48:11Z")

</div>

Try using the latest ES 5.3. I'm getting 'tee' at the top and then 'teen'.

It does not make sense that people enter 'tee' with fuzziness 1 and tennis is at the top because 'ten' !='tee' even with any fuzziness.

---

<div class="post-metadata">

**Author:** ![Maarten\_Roosendaal](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@Maarten\_Roosendaal](https://discuss.elastic.co/u/Maarten_Roosendaal)\
**Post date:** [April 19, 2017, 4:56am UTC](https://discuss.elastic.co/t/completion-suggester-sorting-on-fuzziness/82534/3 "2017-04-19T04:56:02Z")

</div>

Thanks for your reply. I will give that a go but i don't think it will change. All documents get a "\_score": 2 bit i was expecting the behaviour you are.

---

<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:** [May 17, 2017, 5:09am UTC](https://discuss.elastic.co/t/completion-suggester-sorting-on-fuzziness/82534/4 "2017-05-17T05:09:55Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
