Range filter not working for “gt” operator but working for “lt”

As described in About the Elasticsearch category:

DELETE index
PUT index/_doc/1
{
  "foo": "bar"
}
GET index/_search
{
  "query": {
    "match": {
      "foo": "bar"
    }
  }
}