{
"title":{"_value":"湖北移动","_boost":"10"},
"content":"我的移动",
"count":"105",
"channel":"bbc",
"color":"red",
"price":"85",
"boost":"3",
"_boost":"3"
}
这是我根据旧的资料试的,最后两行给文档加权,没有任何效果,把boost _boost都当成了普通字段。后来又看到些资料说es从4.0开始不支持文档提升了,用加权字段的方法模拟给文档加权,我就改了一下,如第一行,因为字段是text文本,按照加权的写法是个object,就直接报错了,文档put不进去了,有用新版本加过权的吗?怎么感觉6.X各种不好使啊。比起2.X改动的如此大。报错如下:
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "failed to parse [title]"
}
],
"type": "mapper_parsing_exception",
"reason": "failed to parse [title]",
"caused_by": {
"type": "illegal_state_exception",
"reason": "Can't get text on a START_OBJECT at 1:10"
}
},
"status": 400
}
1 个回复
locatelli
赞同来自: