title: Elasticsearch: how to extract possible pattern over multiple events with same session id
body: <p><strong>Summary:</strong></p>
  
  <p>I use elasticsearch for my weblogs. I want to get an anwser to the question: how many clients requested page A and page B within one session?</p>
  
  <p><strong>Details:</strong></p>
  
  <p>My Elasticsearch node contains the events that are logged on my website. Each event contains amongst others timestamp, url, referrer and session id. At this moment I know how to find e.g. how many sessions requested url xyz. But I don't know how to find if there are cases that within a session both page A and page B are requested. And of course not that page A or B is part of the referrer.
  Is this something that is somehow supported within elasticsearch?</p>