Skip to content

7.9 not allowing null_value in date type #61712

@psanz-estc

Description

@psanz-estc

Elasticsearch version (bin/elasticsearch --version): 7.9.0

Plugins installed: []

JVM version (java -version):

OS version (uname -a if on a Unix-like system):

Description of the problem including expected versus actual behavior:

Steps to reproduce:

Before 7.9.0, null_value could be used when defining a date:

PUT testindex1
{
  "mappings": {
    "properties": {
      "testdate": {
        "type": "date",
        "null_value": "",
        "format": "dd/MM/yyyy HH:mm:ss"
      }
    }
  }
}

Output:

{
  "acknowledged" : true,
  "shards_acknowledged" : true,
  "index" : "testindex1"
}

In 7.9.0, using the same PUT command, we get an error:

   "type" : "mapper_parsing_exception",
    "reason" : "Failed to parse mapping [_doc]: cannot parse empty date",
    "caused_by" : {
      "type" : "illegal_argument_exception",
      "reason" : "cannot parse empty date"
    }

Using null_value with a keyword as shown in the documentation does work.

Provide logs (if relevant):

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions