# Configuring refresh\_interval at the query level

**URL:** <https://discuss.elastic.co/t/configuring-refresh-interval-at-the-query-level/15601>\
**Category:** Elasticsearch\
**Created:** [February 4, 2014, 9:56pm UTC](https://discuss.elastic.co/t/configuring-refresh-interval-at-the-query-level/15601 "2014-02-04T21:56:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nariman](https://avatars.discourse-cdn.com/v4/letter/n/76d3ee/32.png) [@nariman](https://discuss.elastic.co/u/nariman)\
**Post date:** [February 4, 2014, 9:56pm UTC](https://discuss.elastic.co/t/configuring-refresh-interval-at-the-query-level/15601/1 "2014-02-04T21:56:09Z")

</div>

We've had some success improving bulk insertion times using a higher value  
for refresh\_interval when doing bulk inserts.

However, the global nature of this setting seems to cause some problems.

We want some insertions processed with a higher value and others processed  
immediately (under the default 1s).... there's no way to safely do this in  
a concurrent environment where end-user actions are triggering index  
updates.

Any suggestions on how to handle this?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/2b6d9820-874c-4b10-91d3-3493fe8efd17%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2b6d9820-874c-4b10-91d3-3493fe8efd17%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [February 5, 2014, 8:54am UTC](https://discuss.elastic.co/t/configuring-refresh-interval-at-the-query-level/15601/2 "2014-02-05T08:54:34Z")

</div>

refresh\_interval does not control insertions doc by doc, it works on index  
level, telling a shard it has to switch from written buffer to a readable  
(searchable) index, which can be a heavy operation related to hundreds and  
thousands of words in your documents.

You can index into two different indexes, one with refresh disabled, one  
with refresh enabled.

Jörg

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoEboQW95yocQKOHONOaj%2BBX%2B6a-AViYC8W%2Ba6TxOuw9%2Bw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoEboQW95yocQKOHONOaj%2BBX%2B6a-AViYC8W%2Ba6TxOuw9%2Bw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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 6, 2017, 1:52am UTC](https://discuss.elastic.co/t/configuring-refresh-interval-at-the-query-level/15601/3 "2017-07-06T01:52:30Z")

</div>


