Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Range filter does not support format

I got an unknown issue with elasticsearch, and can't solve it.

Here's my query :

{
  "query": {
    "filtered": {
      "query": {
        "match_all": []
      },
      "filter": {
        "bool": {
          "must": {
            "range": {
              "date": {
                "gte": "14/04/1915",
                "lte": "10/05/1915",
                "format": "dd/MM/yyyy"
              }
            }
          }
        }
      }
    }
  }
}         

This query does not work well. Here's the result of /_validate/query?explain

"index": "dev",
"valid": false,
"error": "org.elasticsearch.index.query.QueryParsingException: [dev] [range] filter does not support [format]"

Do you why it does not work ?

I can't manage to find the answer anywhere on the Inet

like image 402
ChainList Avatar asked May 09 '26 15:05

ChainList


1 Answers

It doesn't work because of this issue: https://github.com/elastic/elasticsearch/pull/7821 which has been added in 1.5.0. In your case, the solution is to upgrade.

like image 200
Andrei Stefan Avatar answered May 12 '26 10:05

Andrei Stefan