Rang query with format

This DSL works:

POST xxxxx/_search?size=1
{
  "profile": "true", 
  "query": {
    "range": {
      "date_createdAt": {
        "gte": "2005W161",
        "lt": "2005W171",
        "format": "basic_week_date"
      }
    }
  }
}

but this DSL get an error:

POST xxxxxx/_search?size=1
{
  "profile": "true", 
  "query": {
    "range": {
      "date_createdAt": {
        "gte": "2005W161",
        "lt": "2005W171",
        "format": "xxxx'W'wwe"
      }
    }
  }
}


This is the official document:

I don't know where the mistake is
and
I want to implement the following customization methods:

POST kbi_beauty_202203_v1/_search?size=1
{
  "profile": "true", 
  "query": {
    "range": {
      "date_createdAt": {
        "gte": "2005-16-1",
        "lt": "2005-17-1",
        "format": "xxxx-ww-e"
      }
    }
  }
}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.