title: elasticsearch comparison between fields
body: <p>Let's say I have documents with the following fields:
  <code>{field1, field2, ... fieldn}</code></p>
  
  <p>I need to run some queries where some of the conditions will require a comparison between two or more fields. like <code>fieldX = fieldY</code></p>
  
  <p>In standard SQL, an example could be:</p>
  
  <pre><code>SELECT * FROM Table1 WHERE farePrice&gt;100 AND originRegion = destinationRegion 
  </code></pre>
  
  <p>I'be been reading some documentation, and it looks "scripting" could be the only way to achieve this? Or are there any other options?</p>