title: Is elasticsearch Range aggregation inclusive
body: <p>The Elasticsearch range aggreagtion aggregates the data within given ranges ie</p>
  
  <pre><code>*GET /_search*
  {
      "aggs" : {
          "price_ranges" : {
              "range" : {
                  "field" : "price",
                  "ranges" : [
                      { "to" : 100.0 },
                      { "from" : 100.0, "to" : 200.0 },
                      { "from" : 200.0 }
                  ]
              }
          }
      }
  }
  </code></pre>
  
  <p>but it doesnt mention if it is inclusive of the values ie if the bucket has documents with values inclusive of 100 and 200 or only those $gt 100
  and $lt 200.</p>
  
  <p>The following discussion states of a similar doubt but that too is inconclusive
  <a href="https://github.com/elastic/elasticsearch/issues/17079" rel="nofollow noreferrer">https://github.com/elastic/elasticsearch/issues/17079</a></p>
  
  <p><strong>TL:DR</strong>
  Does range aggregation support $lte &amp; $gte or $gt &amp; $lt and is there a way to aggregate according to usecase?</p>