Closed
Description
CreateIndexRequest#source(Map<String, Object>, ... )
, which is used when deserializing index creation requests, is too lenient and accidentally accepts mappings that are nested twice under the type key:
{
"mappings": {
"my_type": {
"my_type": {
"properties": { ... }
}
}
}
We will soon be trying to remove types completely from the server code, so it is likely not high-priority to fix. But it seemed worth filing an issue as the behavior is quite confusing and has lead to some surprising bugs when trying to introduce typeless create index requests.
The method PutIndexTemplateRequest#source
has the same issue as well.