# Index.refresh\_interval:-1 does not appear to effect searching

**URL:** <https://discuss.elastic.co/t/index-refresh-interval-1-does-not-appear-to-effect-searching/165381>\
**Category:** Elasticsearch\
**Created:** [January 23, 2019, 10:40am UTC](https://discuss.elastic.co/t/index-refresh-interval-1-does-not-appear-to-effect-searching/165381 "2019-01-23T10:40:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![matthew.whill](https://avatars.discourse-cdn.com/v4/letter/m/dc4da7/32.png) [@matthew.whill](https://discuss.elastic.co/u/matthew.whill)\
**Post date:** [January 23, 2019, 10:40am UTC](https://discuss.elastic.co/t/index-refresh-interval-1-does-not-appear-to-effect-searching/165381/1 "2019-01-23T10:40:11Z")

</div>

I have recently setup Elastic Cloud using the offered AWS implementation.  
I am adding a large amount of documents to the cluster at present so I thought that I would set the index.refresh\_interval to -1 to improve the document insertion.

The document additions are being performed using Java's Spring Elastic Data framework.

If using java I SAVE a new document into a specified index (which is set to index.refresh\_interval=-1s), after it is save, out of curiosity I did a search using Kibana with a search term that I know was in the newly added document. I unexpectedly got a search result back which included the newly added document.

I was not expecting to see that document, as I thought that setting index.refresh\_interval=-1s would not make the document available to any searches, or am I getting this completely wrong?

Please help!

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [January 23, 2019, 11:50am UTC](https://discuss.elastic.co/t/index-refresh-interval-1-does-not-appear-to-effect-searching/165381/2 "2019-01-23T11:50:49Z")

</div>

As [per the documentation](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/tune-for-indexing-speed.html#_disable_refresh_and_replicas_for_initial_loads) you are supposed to set it to `-1` and not `-1s`. Check if that makes a difference.

---

<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:** [February 20, 2019, 12:04pm UTC](https://discuss.elastic.co/t/index-refresh-interval-1-does-not-appear-to-effect-searching/165381/3 "2019-02-20T12:04:27Z")

</div>

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