Skip to content

Failure inserting document with explicit null in range field #27845

Closed
@presto9292

Description

@presto9292

in 5.6.4 the last PUT statement fails, although it is equivalent to the previous insertions

DELETE model_range_index

PUT model_range_index { "mappings": { "my_type": { "properties": { "my_int": { "type": "integer" }, "my_int_range": { "type": "integer_range" } } } } }

PUT model_range_index/my_type/1 { "my_int": 7 }

PUT model_range_index/my_type/2 { "my_int": 7, "my_int_range": [] }

PUT model_range_index/my_type/3 { "my_int": 7, "my_int_range": null }

This is the error response:

{
  "error": {
    "root_cause": [
      {
        "type": "mapper_parsing_exception",
        "reason": "error parsing field [my_int_range], expected an object but got my_int_range"
      }
    ],
    "type": "mapper_parsing_exception",
    "reason": "failed to parse [my_int_range]",
    "caused_by": {
      "type": "mapper_parsing_exception",
      "reason": "error parsing field [my_int_range], expected an object but got my_int_range"
    }
  },
  "status": 400
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Search Foundations/MappingIndex mappings, including merging and defining field typesTeam:Search FoundationsMeta label for the Search Foundations team in Elasticsearchhelp wantedadoptme

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions