Skip to content

Allow scientific notation in date queries (epoch millis format) #21489

@mpe85

Description

@mpe85

When runnig a query against a date field, it is not possible to use a long value with scientific notation.

Sample Query:
{"range":{"updatedAt":{"gte":1.478789928E12}}}

Mapping:
"updatedAt": {
"format": "strict_date_optional_time||epoch_millis",
"store": true,
"type": "date"
}

Parser Error:
{"type":"parse_exception","reason":"failed to parse date field [1.478789928E12] with format [strict_date_optional_time||epoch_millis]"}

Tested with Elasticsearch version 2.3.5 and 2.4.1

Using this format should be possible here, since JSON officially supports the scientific "E" notation in number values (see http://www.json.org)

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Search/SearchSearch-related issues that do not fall into other categories>featurehelp wantedadoptme

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions