Skip to content

Reject out of range numeric values at index time #25534

@colings86

Description

@colings86

Currently if you index a document that contains a numeric value which is out of the range of the numeric type for the field we accept the document and index an infinite value. This can lead to issues like #23003.

Instead we should reject value which are out of range for the selected numeric type (we do this for scaled_float but not currently for float, double and half_float, and we should check integer and long types). For completeness we should also reject explicit infinite values and NaN values in case a script produces these values. JSON does not have a concept of NaN or infinite values so they could only be explicitly inserted by scripts and never from standard index requests.

An open question is whether ignore_malformed should ignore out of range values?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions