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

**URL:** <https://discuss.elastic.co/t/after-deleting-an-index-and-creating-new-index-with-same-name-new-data-is-visible-for-sometime-after-than-old-data-is-coming/301423>\
**Category:** Elasticsearch\
**Created:** [April 3, 2022, 12:35pm UTC](https://discuss.elastic.co/t/after-deleting-an-index-and-creating-new-index-with-same-name-new-data-is-visible-for-sometime-after-than-old-data-is-coming/301423 "2022-04-03T12:35:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sona](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@sona](https://discuss.elastic.co/u/sona)\
**Post date:** [April 3, 2022, 12:35pm UTC](https://discuss.elastic.co/t/after-deleting-an-index-and-creating-new-index-with-same-name-new-data-is-visible-for-sometime-after-than-old-data-is-coming/301423/1 "2022-04-03T12:35:38Z")

</div>

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 pri.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

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 3, 2022, 3:06pm UTC](https://discuss.elastic.co/t/after-deleting-an-index-and-creating-new-index-with-same-name-new-data-is-visible-for-sometime-after-than-old-data-is-coming/301423/2 "2022-04-03T15:06:37Z")

</div>

It means that something is indexing documents in your index.

---

<div class="post-metadata">

**Author:** ![sona](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@sona](https://discuss.elastic.co/u/sona)\
**Post date:** [April 3, 2022, 6:10pm UTC](https://discuss.elastic.co/t/after-deleting-an-index-and-creating-new-index-with-same-name-new-data-is-visible-for-sometime-after-than-old-data-is-coming/301423/3 "2022-04-03T18:10:38Z")

</div>

My bad, after digging in deep I found out that application is deployed with same application.properties 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

---

<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 1, 2022, 6:10pm UTC](https://discuss.elastic.co/t/after-deleting-an-index-and-creating-new-index-with-same-name-new-data-is-visible-for-sometime-after-than-old-data-is-coming/301423/4 "2022-05-01T18:10:49Z")

</div>

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