此映射已在 ES 2.X 中运行,现在在 ES 5 中出现异常:
{
"type1":{
"properties":{
"name":{
"type":"multi_field",
"fields":{
"name":{
"type":"string",
"index_analyzer":"standard",
"index":"analyzed",
"store":"no",
"search_analyzer":"standard"
},
"name_autocomplete":{
"type":"string",
"index_analyzer":"autocomplete",
"index":"analyzed",
"store":"no",
"search_analyzer":"standard"
}
}
}
}
}
}
例外的是:
没有在字段 [name] 上声明类型 [multi_field] 的处理程序
有人出主意吗?谢谢! ;)
multi-field
在 ES 1.x 中已弃用,并在 ES 5.x 中完全删除。
现在通过使用支持多字段fields您可以这样指定:
{
"type1":{
"properties":{
"name":{
"type":"text",
"analyzer":"standard",
"index":"analyzed",
"store":"no",
"search_analyzer":"standard"
"fields": {
"autocomplete":{
"type":"text",
"analyzer":"autocomplete",
"index":"analyzed",
"store":"no",
"search_analyzer":"standard"
}
}
}
}
}
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)