# Completion Suggester no longer deduplicating

**URL:** <https://discuss.elastic.co/t/completion-suggester-no-longer-deduplicating/70136>\
**Category:** Elasticsearch\
**Created:** [December 28, 2016, 11:48am UTC](https://discuss.elastic.co/t/completion-suggester-no-longer-deduplicating/70136 "2016-12-28T11:48:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mortenbock](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mortenbock/32/13062_2.png) [@mortenbock](https://discuss.elastic.co/u/mortenbock)\
**Post date:** [December 28, 2016, 11:48am UTC](https://discuss.elastic.co/t/completion-suggester-no-longer-deduplicating/70136/1 "2016-12-28T11:48:10Z")

</div>

We are in the process of migrating our code to use elastic 5.x instead of 2.1.

In the index we have products, where many of them contain the same words in the suggest field.

In 2.1 this was not an issue, because the result from the query was automatically deduplicated.

What happens in 5.1 is that instead of getting 5 unique suggestions back, we get 5 identical suggestions, but from different source documents.

Is there a way to make the Completion Suggester deduplicate the result in 5.1, or do we need to move to a different feature to achieve the same functionality?

If so, what would be the way to get unique suggestions back, based on the users search term?

---

<div class="post-metadata">

**Author:** ![amar-tari](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amar-tari/32/14243_2.png) [@amar-tari](https://discuss.elastic.co/u/amar-tari)\
**Post date:** [December 28, 2016, 12:06pm UTC](https://discuss.elastic.co/t/completion-suggester-no-longer-deduplicating/70136/2 "2016-12-28T12:06:39Z")

</div>

> <https://github.com/elastic/elasticsearch/issues/8909>

If you use completion suggester it never gives duplicate I guess.

---

<div class="post-metadata">

**Author:** ![mortenbock](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mortenbock/32/13062_2.png) [@mortenbock](https://discuss.elastic.co/u/mortenbock)\
**Post date:** [December 28, 2016, 12:14pm UTC](https://discuss.elastic.co/t/completion-suggester-no-longer-deduplicating/70136/3 "2016-12-28T12:14:55Z")

</div>

This seems to be true in elastic 2.1, but in 5.x the suggester has been rewritten, and returns a different kind of response.

---

<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:** [January 25, 2017, 12:14pm UTC](https://discuss.elastic.co/t/completion-suggester-no-longer-deduplicating/70136/4 "2017-01-25T12:14:57Z")

</div>

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