Skip to content

Dynamic date detection accepting years < 4 digits #6158

@clintongormley

Description

@clintongormley

Dynamic date detection should only detect 4 digit years, but it is misinterpreting the 5 in 5/12/14 as the year 0005:

DELETE /t

PUT /t/t/1
{
  "d": "5/12/14"
}

GET /t/_search
{
  "aggs": {
    "foo": {
      "date_histogram": {
        "field": "d",
        "interval": "day"
      }
    }
  }
}

Returns:

"aggregations": {
  "foo": {
     "buckets": [
        {
           "key_as_string": "0005/12/14 00:00:00",
           "key": -61979385600000,
           "doc_count": 1
        }
     ]
  }
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions