Completion Suggester Sorting on Fuzziness

(Maarten Roosendaal) #1


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.


(Jimmy Kuang) #2

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.

(Maarten Roosendaal) #3

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.

(system) #4

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