title: how to create query which can calculate time difference?
body: <p>I have and index with following documents:</p>
  
  <pre><code>{name: 'Device1', type: 'start', 'eventTime': '2013-02-19 12:00:00'}
  {name: 'Device2', type: 'start', 'eventTime': '2013-02-19 12:02:00'}
  {name: 'Device1', type: 'stop', 'eventTime': '2013-02-19 12:45:00'}
  {name: 'Device2', type: 'stop', 'eventTime': '2013-02-19 12:50:00'}
  </code></pre>
  
  <p>I would like to create a query which will return for me a new field with time differences between eventTime's, faceted by device name and regards with field type. For the example it should be:</p>
  
  <pre><code>{name: 'Device1', 'type': 'it really doesnt matter', eventTime: 'also doesnt matter', duration: '00:45:00'}
  {name 'Device2', 'type': 'it really doesnt matter', eventTime: 'also doesnt matter', duration: '00:48:00'}
  </code></pre>
  
  <p>Is it possible with elastic search query language?</p>