title: Solr - calculate duration from start and end dates
body: <p>Using Solr 8.0.0, with each document holding a start timestamp field and an end timestamp field, how would I query in a way that returns just the duration between these dates? So I would be going for an equation like this:</p>
  
  <p>(Endtime - Starttime) - 500 seconds = 23 seconds over expected duration.</p>
  
  <p>But getting the result across all documents in the collection.</p>
  
  <p>Would this be the subject of a streaming expression? Any example code you can give? I specifically want to keep this calculation load within the SolrCloud.</p>