title: Is it possible to stream documents from elastic search?
body: <p>Is it possible to have a persistant HTTP connection to an elasticsearch where it simply outputs new documents when they are indexed?</p>
  
  <p>For example, I'm adding a theoretical argument called <code>stream</code>:</p>
  
  <pre><code>curl -X GET 'http://localhost:9200/documents/_search?stream'
  
  {"_index":"documents", "_type":"doc", "field": "value #1"}
  {"_index":"documents", "_type":"doc", "field": "value #2"}
  {"_index":"documents", "_type":"doc", "field": "value #3"}
  </code></pre>
  
  <p>... which would keep the connection running, presumably with HTTP chunked mode, until the client disconnects.</p>
  
  <p>The alternative that I'm considering is to execute a GET request every second to the cluster with a time range of a second. I was hoping of a streaming mode to prevent the overhead.</p>
  
  <p>There are elasticsearch <a href="http://www.elasticsearch.org/guide/reference/river/" rel="noreferrer">Rivers</a>, which seems to be the opposite to this.</p>