title: To find difference between two integer fields and check it falls under a specific range, using scripts in elasticsearch
body: <p>I have two fields,let us name them "fieldA" and "fieldB" in my documents and i need to find the difference between them and check if that value falls under a specific range say "rangeA" or " rangeB" and then return the documents that matches my criteria.
  The schema for data is as shown below:</p>
  
  <pre><code>{
  "fieldA": 45
  "fieldB":13
  }
  </code></pre>
  
  <p>I need to find all the document which have the difference between "fieldA" and "fieldB" in between 30 and 35. How can i do this using scripting in elasticsearch?</p>