Skip to content

array_index_out_of_bounds_exception for field name which is "." #21862

@robin13

Description

@robin13

Elasticsearch version: 5.0.1

Plugins installed: [] none

JVM version:1.8.0_111

OS version: Ubuntu 16.04

Description of the problem including expected versus actual behavior:

Steps to reproduce:
Without any custom templates or mapping, try this:

POST /test/test/1
{
    "." : {
        "foo" : {
            "bar" : 123
        }
    }
}

and you will receive this 400 error:

{
  "error" : {
    "root_cause" : [
      {
        "type" : "mapper_parsing_exception",
        "reason" : "failed to parse"
      }
    ],
    "type" : "mapper_parsing_exception",
    "reason" : "failed to parse",
    "caused_by" : {
      "type" : "array_index_out_of_bounds_exception",
      "reason" : "-1"
    }
  },
  "status" : 400
}

It seems that a single . is not a valid field name (I cannot find documentation detailing this), and even if this is the case, the error is not very helpful.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions