title: elasticsearch query dates by range
body: <p>My elasticsearch has data, particularly something like this for dates:</p>
  
  <pre><code>{
    "startTime": {
      "type": "string",
      "format": "yyyy/MM/dd",
      "index": "analyzed",
      "analyzer": "keyword"
    }
  }
  </code></pre>
  
  <p>I am adding a <a href="http://www.dangrossman.info/2012/08/20/a-date-range-picker-for-twitter-bootstrap/" rel="nofollow noreferrer">date range picker</a> and want to use the dates picked to go query elasticsearch for data with startTime inside this range chosen. I'm not sure how to structure this query to elasticsearch, or if it will even work with this being a string field (I can potentially change it, though).</p>
  
  <p>can anyone help me here?</p>