Skip to content

Unsigned long field mapping behaviour is inconsistent with other numeric fields #67565

@stevejgordon

Description

@stevejgordon

Elasticsearch version: 7.11.0
Plugins installed: []
JVM version: n/a
OS version: n/a

Description of the problem including expected versus actual behavior:
There is a discrepancy for unsigned_long vs. other numeric fields when providing a null_value in the mapping. Currently, integer for example, accepts a null_value of 1.0 which is checked for empty fractal parts. It will correctly reject a null value of 1.5. unsigned_long mappings return a "mapper_parsing_exception" when 1.0 is specified.

Ideally, the unsigned_long field should behave in the same way as other numeric fields and check for empty fractal parts.

Steps to reproduce:

  1. Attempt to create an index with the following mapping
PUT my_index
{
  "mappings": {
    "properties": {
      "my_counter": {
        "type": "unsigned_long",
        "null_value": 1.0
      },
      "my_int": {
        "type": "integer",
        "null_value": 1.0
      },
      "my_short": {
        "type": "short",
        "null_value": 1.0
      }
    }
  }
}
  1. Only the my_counter field causes a "mapper_parsing_exception".

Metadata

Metadata

Assignees

Labels

:Search Foundations/MappingIndex mappings, including merging and defining field types>bugTeam:Search FoundationsMeta label for the Search Foundations team in Elasticsearch

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