# Issue regarding completion suggester in elasticsearch?

**URL:** <https://discuss.elastic.co/t/issue-regarding-completion-suggester-in-elasticsearch/47856>\
**Category:** Elasticsearch\
**Created:** [April 20, 2016, 5:27am UTC](https://discuss.elastic.co/t/issue-regarding-completion-suggester-in-elasticsearch/47856 "2016-04-20T05:27:53Z")\
**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:** [April 20, 2016, 5:27am UTC](https://discuss.elastic.co/t/issue-regarding-completion-suggester-in-elasticsearch/47856/1 "2016-04-20T05:27:53Z")

</div>

I have used completion suggester for [suggestions.So](http://suggestions.So) my question is I have created a type called "states" in one of indices and I have indexed around 10k documents to that type.

For some reason I have dropped that type and re-indexed the documents.

Here is the mystery while I'm querying for that type it is showing me the old suggestions.

We are using elasticsearch2.2.0

Please let me know if there are options to get the results based on the current type documents.

Thanks in advance,

Kartheek Gummaluri

---

<div class="post-metadata">

**Author:** ![cbuescher](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cbuescher/32/60402_2.png) [@cbuescher](https://discuss.elastic.co/u/cbuescher)\
**Post date:** [April 20, 2016, 8:53am UTC](https://discuss.elastic.co/t/issue-regarding-completion-suggester-in-elasticsearch/47856/2 "2016-04-20T08:53:12Z")

</div>

Hi,

there's a not at the bottom of the [docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-suggesters-completion.html#indexing) saying that:

> The suggest data structure might not reflect deletes on  
> documents immediately. You may need to do an Optimize for that.  
> You can call optimize with the only\_expunge\_deletes=true to only target  
> deletions for merging.

Have you tried that? Not sure if it helps but I'd start with that.

---

<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:** [April 20, 2016, 9:01am UTC](https://discuss.elastic.co/t/issue-regarding-completion-suggester-in-elasticsearch/47856/3 "2016-04-20T09:01:17Z")

</div>

I tried that one but it is not working

---

<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, 10:57pm UTC](https://discuss.elastic.co/t/issue-regarding-completion-suggester-in-elasticsearch/47856/4 "2017-07-05T22:57:45Z")

</div>


