Deleted documents show up in completion suggester

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.

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?

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.