# Ideal refresh for indexing 1.5k docs at every 30 minutes?

**URL:** <https://discuss.elastic.co/t/ideal-refresh-for-indexing-1-5k-docs-at-every-30-minutes/32648>\
**Category:** Elasticsearch\
**Created:** [October 21, 2015, 8:10am UTC](https://discuss.elastic.co/t/ideal-refresh-for-indexing-1-5k-docs-at-every-30-minutes/32648 "2015-10-21T08:10:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![N\_M\_10](https://avatars.discourse-cdn.com/v4/letter/n/f19dbf/32.png) [@N\_M\_10](https://discuss.elastic.co/u/N_M_10)\
**Post date:** [October 21, 2015, 8:10am UTC](https://discuss.elastic.co/t/ideal-refresh-for-indexing-1-5k-docs-at-every-30-minutes/32648/1 "2015-10-21T08:10:13Z")

</div>

We are using Elastic-PHP client,

default refresh interval is set to 5s  
but after indexing new and deleting old stuff we do refresh at code level using

```
$refresh = $client->indices()->refresh();

```

then still it take 3-4 minutes to make new data visible for searching, can u help with this weared behavior of elasticsearch?

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [October 21, 2015, 9:28am UTC](https://discuss.elastic.co/t/ideal-refresh-for-indexing-1-5k-docs-at-every-30-minutes/32648/2 "2015-10-21T09:28:38Z")

</div>

3 or 4 minutes is a lot for a refresh operation. I guess it could happen if you configured heavy warmers or have too many shards.

---

<div class="post-metadata">

**Author:** ![N\_M\_10](https://avatars.discourse-cdn.com/v4/letter/n/f19dbf/32.png) [@N\_M\_10](https://discuss.elastic.co/u/N_M_10)\
**Post date:** [October 21, 2015, 10:25am UTC](https://discuss.elastic.co/t/ideal-refresh-for-indexing-1-5k-docs-at-every-30-minutes/32648/3 "2015-10-21T10:25:28Z")

</div>

we have only 3 shards and 2 replica, we have not set anything for warmer.  
can u point what else it could be?

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [October 21, 2015, 10:48am UTC](https://discuss.elastic.co/t/ideal-refresh-for-indexing-1-5k-docs-at-every-30-minutes/32648/4 "2015-10-21T10:48:57Z")

</div>

How do you check whether the refresh happened or not? Does it take 3/4 minutes for the refresh operation to return or does it return instantly and then changes only become visible after 3/4 minutes?

---

<div class="post-metadata">

**Author:** ![N\_M\_10](https://avatars.discourse-cdn.com/v4/letter/n/f19dbf/32.png) [@N\_M\_10](https://discuss.elastic.co/u/N_M_10)\
**Post date:** [October 21, 2015, 10:53am UTC](https://discuss.elastic.co/t/ideal-refresh-for-indexing-1-5k-docs-at-every-30-minutes/32648/5 "2015-10-21T10:53:11Z")

</div>

i have written refresh code after indexing new and deleting old data, my cron-job had completed which i came to know because we use bugsnag for monitoring of jobs, so we received message in bugsnag but the the topic which we are waiting to come in searching didn't showed up until 4 minutes (so we waited 4 minutes after receiving message in bugsnag).

so code has not taken 3-4 minutes but elastic has taken 3-4 minutes to make that particular topic available for search.

so i didnt understand this behavior, and finding what might be wrong?

inshort : it Does not take 3/4 minutes for the refresh operation to return it return instantly but then changes only become visible after 3/4 minutes

---

<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, 11:43pm UTC](https://discuss.elastic.co/t/ideal-refresh-for-indexing-1-5k-docs-at-every-30-minutes/32648/6 "2017-07-05T23:43:35Z")

</div>


