# Elasticsearch refreshing indices, but documents still don't show up in search

**URL:** https://discuss.elastic.co/t/elasticsearch-refreshing-indices-but-documents-still-dont-show-up-in-search/319325
**Category:** Elasticsearch
**Created:** [November 18, 2022, 5:08pm UTC](https://discuss.elastic.co/t/elasticsearch-refreshing-indices-but-documents-still-dont-show-up-in-search/319325 "2022-11-18T17:08:25Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Ivo\_Tavares](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ivo_tavares/32/110022_2.png) [@Ivo\_Tavares](https://discuss.elastic.co/u/Ivo_Tavares)
#### Post date: [November 18, 2022, 5:08pm UTC](https://discuss.elastic.co/t/elasticsearch-refreshing-indices-but-documents-still-dont-show-up-in-search/319325/1 "2022-11-18T17:08:25Z")

</div>

I'm creating some documents on an index, using bulk. I can access them using get or mget. When I did a search, those documents didn't show up. So, I decided to refresh the indices. However, in some cases, it still happens that even after refreshing, the search can't find those documents, even though they exist.

I've read the official documentation, and it seems that bulk allows for a refresh parameter, but I'm not sure if it's really what I want, or whether there's something better.

Also, this problem appears quite randomly...

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [November 21, 2022, 1:47am UTC](https://discuss.elastic.co/t/elasticsearch-refreshing-indices-but-documents-still-dont-show-up-in-search/319325/2 "2022-11-21T01:47:01Z")

</div>

Can you share a replication of the documents, query and responses you are getting so we can try to mirror what you are seeing?

---

<div class="post-metadata">

### Author: ![Ivo\_Tavares](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ivo_tavares/32/110022_2.png) [@Ivo\_Tavares](https://discuss.elastic.co/u/Ivo_Tavares)
#### Post date: [November 21, 2022, 8:51pm UTC](https://discuss.elastic.co/t/elasticsearch-refreshing-indices-but-documents-still-dont-show-up-in-search/319325/3 "2022-11-21T20:51:45Z")

</div>

Hi @warkolm, thanks for your interest in this question... I'm afraid that there's no simple minimal working example, since I'm not sure how to replicate it, and I'm dealing with proprietary data... I was hoping that there would be a simple way to deal with this, that I may have missed something simple... Right now, I had to create a while loop (I'm using the high-level python client) that only ends my function after I've confirmed the accessibility of the documents with a search/query object (with an exponential waiting time).

---

<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: [December 19, 2022, 8:52pm UTC](https://discuss.elastic.co/t/elasticsearch-refreshing-indices-but-documents-still-dont-show-up-in-search/319325/4 "2022-12-19T20:52:02Z")

</div>

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