-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
:Search Foundations/MappingIndex mappings, including merging and defining field typesIndex mappings, including merging and defining field types>bugTeam:Search FoundationsMeta label for the Search Foundations team in ElasticsearchMeta label for the Search Foundations team in Elasticsearchhelp wantedadoptmeadoptme
Description
Elasticsearch version: 7.5.2
Plugins installed: []
JVM version: (Elastic Cloud)
OS version: (Elastic Cloud)
Description of the problem including expected versus actual behavior:
Actual behavior: An (invalid) mappings update request, where dynamic_mappings is an object instead of an array, results in a http response with a 500 code.
Expected behavior: A 400 (bad request) http response code.
Steps to reproduce:
- Create a new index
my_index - Send the following request through Kibana's console
PUT /my_index/_mappings
{
"dynamic_templates": {}
}
- Notice the 500 response:
{
"error": {
"root_cause": [
{
"type": "class_cast_exception",
"reason": "class java.util.LinkedHashMap cannot be cast to class java.util.List (java.util.LinkedHashMap and java.util.List are in module java.base of loader 'bootstrap')"
}
],
"type": "class_cast_exception",
"reason": "class java.util.LinkedHashMap cannot be cast to class java.util.List (java.util.LinkedHashMap and java.util.List are in module java.base of loader 'bootstrap')"
},
"status": 500
}
Metadata
Metadata
Assignees
Labels
:Search Foundations/MappingIndex mappings, including merging and defining field typesIndex mappings, including merging and defining field types>bugTeam:Search FoundationsMeta label for the Search Foundations team in ElasticsearchMeta label for the Search Foundations team in Elasticsearchhelp wantedadoptmeadoptme