title: Grep like nearby lines from ElasticSearch
body: <p>The application I'm debugging creates log files with many API calls logged as two events:</p>
  
  <pre><code>timestamp1 request_ip--&gt;{$URL}
  timestamp2 response_ip&lt;--{$DATA}
  </code></pre>
  
  <p>I've recently started pouring the logs into ElasticSearch using LogStash (with Kibana as a web front).</p>
  
  <p>Is there any way to do a search that includes nearby lines? Assume that request and response are always consecutive, if this helps.</p>
  
  <p>With grep I would have done:</p>
  
  <pre><code>grep -A 1 "--&gt;{$URL}"
  </code></pre>
  
  <p>How can I do the same with an existing LogStash+ElasticSearch deployment?</p>