解析后如何修复根类型映射不为空! Elasticsearch中的错误,用于创建动态映射

时间:2015-09-23 14:40:23

标签: java elasticsearch

我使用java API在运行时创建了索引的动态映射。映射值正确形成但是抛出

  

错误:org.elasticsearch.index.mapper.MapperParsingException:解析后根类型映射不为空!剩下的字段:

我搜索了所有可能性,但没有得到解决方案。形成的映射值为{"Index":{"properties":{"dynamic_template":[{"template_1":{"path_match":"*"},"f1":{"type":"String","include_in_all":true},"f2":{"type":"String","include_in_all":true},"f3":{"type":"String","include_in_all":true},"f4":{"type":"String","include_in_all":true}}]}}}

错误讯息是

  

错误:org.elasticsearch.index.mapper.MapperParsingException:解析后根类型映射不为空!剩余字段:[案例表:{properties = {dynamic_template = [{template_1 = {path_match = *},f1 = {type = String,include_in_all = true},f2 = {type = String,include_in_all = true},f3 = {type = String,include_in_all = true},f4 = {type = String,include_in_all = true}}]}}]

我不知道修复它。是否有人指导我修复它。

0 个答案:

没有答案