title: What exactly does -1 refresh_interval in Elasticsearch mean?
body: <p>I have read a lot of articles about index refreshing in Elasticsearch. I understand the implication of different intervals that are greater than 0, which is the elapsed time between consecutive segments flush, making them available for search. However, I am not sure what <code>refresh_interval: -1</code> does exactly. In my understanding, it's a means to disable automatic index refreshing but not completely. Elasticsearch still flushes segments from time to time even though the <code>refresh_interval</code> is set to -1. I wonder which mechanism governs this flushing activity if automatic refresh is disabled.</p>
  
  <p>Sorry I know I don't have a lot of code to post, so I will give a bit of background into what I am after. My application doesn't need near real-time search; it only needs eventual consistency. However, this eventuality should be reasonable, i.e. within a few seconds to less than a minute, not half an hour. I was wondering if I can leave it to Elasticsearch to decide when best to refresh at its convenience rather than refreshing at a regular interval. The reason is because disabling automatic refreshing does bring some benefits in terms of performance to my application, e.g. JVM Heap Size usage rises less aggressively in between garbage collection interval (see graph below)</p>
  
  <p><a href="https://i.stack.imgur.com/3Ddpe.png" rel="noreferrer"><img src="https://i.stack.imgur.com/3Ddpe.png" alt="After disabling refresh interval, heap usage rises less aggressively "></a></p>