# Fuzzy options on CompletionSuggestionBuilder - migration from 2.5 -\> 5.6

**URL:** <https://discuss.elastic.co/t/fuzzy-options-on-completionsuggestionbuilder-migration-from-2-5-5-6/135913>\
**Category:** Elasticsearch\
**Created:** [June 14, 2018, 12:27pm UTC](https://discuss.elastic.co/t/fuzzy-options-on-completionsuggestionbuilder-migration-from-2-5-5-6/135913 "2018-06-14T12:27:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tomek\_Kurek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tomek_kurek/32/32272_2.png) [@Tomek\_Kurek](https://discuss.elastic.co/u/Tomek_Kurek)\
**Post date:** [June 14, 2018, 12:27pm UTC](https://discuss.elastic.co/t/fuzzy-options-on-completionsuggestionbuilder-migration-from-2-5-5-6/135913/1 "2018-06-14T12:27:27Z")

</div>

Hi everyone,

I am trying migrate es from version 2.4 to 5.6 and I have problem with understanding fuzzy options in CompletionSuggestionBuilder. Before upgrade we used api in the way

`
CompletionSuggestionFuzzyBuilder(suggestion.name).text(suggestion.text).size(suggestion.size)`

Of course I had to adjust name which is now parameter in SuggestBuilder.addSuggestion. During next step I'd like to adjust fuzzy options. In 5.6 java client I don't have CompletionSuggestionFuzzyBuilder, but I can set Fuzziness in CompletionSuggestionBuilder. My question is :

1. Why is it possible only in method prefix?
2. (maybe related) What is the difference between method text and prefix. (earlier we used text method).

I've tried to find useful information in documentation, release notes etc, also analyzed code but it is hard, because changes in this module (suggestions) are huge.  
Thanks for your help!

---

<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 12, 2018, 12:27pm UTC](https://discuss.elastic.co/t/fuzzy-options-on-completionsuggestionbuilder-migration-from-2-5-5-6/135913/2 "2018-07-12T12:27:28Z")

</div>

Closed on July 12, 2018, 12:27pm UTC

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