-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Closed
Labels
:Search Foundations/MappingIndex mappings, including merging and defining field typesIndex mappings, including merging and defining field types>enhancementTeam:Search FoundationsMeta label for the Search Foundations team in ElasticsearchMeta label for the Search Foundations team in Elasticsearchv7.13.0v8.0.0-alpha1
Description
Tested in 7.12.0
POST my_index/_doc
{".":{}}
returns:
{
"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" : "Index -1 out of bounds for length 0"
}
},
"status" : 400
}The message is not clear, making it hard to identify the problem. It should be explicit as for empty field names:
POST my_index/_doc
{"":{}}
{
"error" : {
"root_cause" : [
{
"type" : "mapper_parsing_exception",
"reason" : "failed to parse"
}
],
"type" : "mapper_parsing_exception",
"reason" : "failed to parse",
"caused_by" : {
"type" : "illegal_argument_exception",
"reason" : "field name cannot be an empty string"
}
},
"status" : 400
}
infa-amchandr
Metadata
Metadata
Assignees
Labels
:Search Foundations/MappingIndex mappings, including merging and defining field typesIndex mappings, including merging and defining field types>enhancementTeam:Search FoundationsMeta label for the Search Foundations team in ElasticsearchMeta label for the Search Foundations team in Elasticsearchv7.13.0v8.0.0-alpha1