# Deleted documents show up in completion suggester

**URL:** <https://discuss.elastic.co/t/deleted-documents-show-up-in-completion-suggester/39735>\
**Category:** Elasticsearch\
**Created:** [January 21, 2016, 7:01am UTC](https://discuss.elastic.co/t/deleted-documents-show-up-in-completion-suggester/39735 "2016-01-21T07:01:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kartheek91](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@kartheek91](https://discuss.elastic.co/u/kartheek91)\
**Post date:** [January 21, 2016, 7:01am UTC](https://discuss.elastic.co/t/deleted-documents-show-up-in-completion-suggester/39735/1 "2016-01-21T07:01:22Z")

</div>

I have the following steps:

create an index  
index 2 documents  
get suggestions  
delete a document  
get suggestions  
When I do this with a set of curl commands, the 5th step doesn't return any suggestions as expected since I deleted the document corresponding to it. But when I do these steps with the library, a suggestion is returned for the deleted document.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [January 21, 2016, 7:05am UTC](https://discuss.elastic.co/t/deleted-documents-show-up-in-completion-suggester/39735/2 "2016-01-21T07:05:22Z")

</div>

Deleting a document is in effect an update, and will require a refresh to take place before it reflects in the search results. How quickly after the delete do you issue the query?

---

<div class="post-metadata">

**Author:** ![kartheek91](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@kartheek91](https://discuss.elastic.co/u/kartheek91)\
**Post date:** [January 21, 2016, 7:06am UTC](https://discuss.elastic.co/t/deleted-documents-show-up-in-completion-suggester/39735/3 "2016-01-21T07:06:44Z")

</div>

Actually I have deleted a type in elasticsearch index and try to index that type with new values but it is returning suggest with old values.

---

<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 5, 2017, 11:22pm UTC](https://discuss.elastic.co/t/deleted-documents-show-up-in-completion-suggester/39735/4 "2017-07-05T23:22:41Z")

</div>


