Like I said, I did follow the removal-of-types. So the template that I have now looks like following,
{
"myindex-template" : {
"order" : 0,
"index_patterns" : [
"myindex-"
],
"settings" : {
"index" : {
"number_of_shards" : "2",
"number_of_replicas" : "1",
"refresh_interval" : "60s"
}
},
"mappings" : {
"_doc" : {
"dynamic_templates" : [
{
"message_field" : {
"path_match" : "message",
"mapping" : {
"norms" : false,
"type" : "text"
},
"match_mapping_type" : "string"
}
},
{
"string_fields" : {
"mapping" : {
"norms" : false,
"fields" : {
"keyword" : {
"ignore_above" : 256,
"type" : "keyword"
}
},
"type" : "text"
},
"match_mapping_type" : "string",
"match" : ""
}
}
],
"properties" : {
"@timestamp" : {
"type" : "date"
},
"geoip" : {
"dynamic" : "true",
"properties" : {
"city_name" : {
"norms" : false,
"type" : "text",
"fields" : {
"keyword" : {
"ignore_above" : 256,
"type" : "keyword"
}
}
},
"CustomerIP" : {
"type" : "ip"
},
"ip" : {
"type" : "ip"
},
"latitude" : {
"type" : "half_float"
},
"country_code2" : {
"norms" : false,
"type" : "text",
"fields" : {
"keyword" : {
"ignore_above" : 256,
"type" : "keyword"
}
}
},
"country_name" : {
"norms" : false,
"type" : "text",
"fields" : {
"keyword" : {
"ignore_above" : 256,
"type" : "keyword"
}
}
},
"continent_code" : {
"norms" : false,
"type" : "text",
"fields" : {
"keyword" : {
"ignore_above" : 256,
"type" : "keyword"
}
}
},
"location" : {
"type" : "geo_point"
},
"region_name" : {
"norms" : false,
"type" : "text",
"fields" : {
"keyword" : {
"ignore_above" : 256,
"type" : "keyword"
}
}
},
"longitude" : {
"type" : "half_float"
},
"region_code" : {
"norms" : false,
"type" : "text",
"fields" : {
"keyword" : {
"ignore_above" : 256,
"type" : "keyword"
}
}
}
}
},
"@version" : {
"type" : "keyword"
}
}
}
},
"aliases" : { }
}
}
When I try to rollover or add new index. I get the same error.
"defaults mappings are not useful anymore now that indices can have at most one type"
Please help, as you see the _doc is used in the template.