After deleting an index and creating new index with same name, new data is visible for sometime after than old data is coming

I have deleted an index from my Elasticsearch and created the new index with same name. When I am trying to get doc.count using below command then initially it is showing 0

curl -X GET "localhost:9200/_cat/indices?v&pretty"

but after 10-15 it starts showing :

health status index uuid pri rep docs.count docs.deleted store.size
yellow open index_name uuid 1 1 2564 16068 1.9mb 1.9mb

I tried everything as per my knowledge(like deleting index, clearing cache, updating document) nothing is working. Even if I am trying to update data of any document inside this index then updated data is visible for may be 10 min, after that again old data is coming

It means that something is indexing documents in your index.

My bad, after digging in deep I found out that application is deployed with same files in two different clusters with different database(one is having old data and other is with new data) connecting to the same Elasticsearch instance.

Thanks for quick reply

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