# Deleted documents appear in suggestion list

**URL:** <https://discuss.elastic.co/t/deleted-documents-appear-in-suggestion-list/83618>\
**Category:** Elasticsearch\
**Created:** [April 25, 2017, 9:01pm UTC](https://discuss.elastic.co/t/deleted-documents-appear-in-suggestion-list/83618 "2017-04-25T21:01:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ebrahim-Yewno](https://avatars.discourse-cdn.com/v4/letter/e/f19dbf/32.png) [@Ebrahim-Yewno](https://discuss.elastic.co/u/Ebrahim-Yewno)\
**Post date:** [April 25, 2017, 9:01pm UTC](https://discuss.elastic.co/t/deleted-documents-appear-in-suggestion-list/83618/1 "2017-04-25T21:01:17Z")

</div>

I have deleted documents from an index, but still see them in suggestions. I have tried explicit refresh, but it also doesn't help.  
I could track this problem [back in 2014 in earlier](https://github.com/elastic/elasticsearch-js/issues/117) versions, but it sounds that it is solved in current version, but I'm facing the same problem.

Is there any way to purge a document from an index including suggestions?

---

<div class="post-metadata">

**Author:** ![shanec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shanec/32/4004_2.png) [@shanec](https://discuss.elastic.co/u/shanec)\
**Post date:** [April 25, 2017, 9:21pm UTC](https://discuss.elastic.co/t/deleted-documents-appear-in-suggestion-list/83618/2 "2017-04-25T21:21:34Z")

</div>

This is a well known limitation of older versions/completion suggesters. There have been a variety of issues posted around it. If you search around the for "completion suggester deleted documents" you'll find any number of them, including the issue you linked (but many others as well).

In 5.0, the completion suggester was completely rewritten to take deleted documents into account. See [https://www.elastic.co/blog/elasticsearch-5-0-0-released](https://www.elastic.co/blog/elasticsearch-5-0-0-released) and [https://www.elastic.co/guide/en/elasticsearch/reference/5.3/search-suggesters-completion.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.3/search-suggesters-completion.html) for some details. You should upgrade to 5.3+ to take advantage of this!

---

<div class="post-metadata">

**Author:** ![Nilabhsagar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nilabhsagar/32/10647_2.png) [@Nilabhsagar](https://discuss.elastic.co/u/Nilabhsagar)\
**Post date:** [April 26, 2017, 2:38am UTC](https://discuss.elastic.co/t/deleted-documents-appear-in-suggestion-list/83618/3 "2017-04-26T02:38:42Z")

</div>

@shanec suggestion is right and you should think about migrating to ES 5.3+.

Also follow these migration steps:  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-upgrade.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-upgrade.html)

---

<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 24, 2017, 2:50am UTC](https://discuss.elastic.co/t/deleted-documents-appear-in-suggestion-list/83618/4 "2017-05-24T02:50:49Z")

</div>

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