I'm testing with ElasticSearch and I'm having problems with ranged queries. Consider the following document that I've inserted:
curl -XPUT 'localhost:9200/test/test/test?pretty' -d '
{
  "name": "John Doe",
  "duration" : "10",
  "state" : "unknown"
}'
And now I'me trying to do a ranged query that catches all documents whose duration is between 5 and 15:
curl -XPOST 'localhost:9200/test/_search?pretty' -d '
{
  "query": {
    "range": {
      "duration": {
        "gte": "5",
        "lte": "15"
      }
    }
  }
}'
This returns no hits however if I run the Query like this:
curl -XPOST 'localhost:9200/test/_search?pretty' -d '
{
  "query": {
    "range": {
      "duration": {
        "gte": "10"
      }
    }
  }
}'
It returns the Document I've inserted earlier. How can I query ElasticSearch for documents with the duration value between 5 and 15.
