3
的elasticsearch documentation状态:Elasticsearch短语建议
在实践中,这种建议者将能够做出更好的决定哪些令牌挑基于联合occurence和频率。
我有我的索引文件具有与内容Bella Tank
一个名场。
要测试语建议者,我发送以下查询:
curl -XPOST 'localhost:9200/my_index/_search?pretty' -d '{
"suggest" : {
"text" : "Bell Tank",
"suggestion": {
"phrase": {
"field": "name",
"size": 3
}
}
}
}'
而且3点建议,我收到如下:
"suggest" : {
"suggestion" : [ {
"text" : "Bell Tank",
"offset" : 0,
"length" : 9,
"options" : [ {
"text" : "ball tank",
"score" : 0.03721739
}, {
"text" : "bella tank",
"score" : 0.03721739
}, {
"text" : "bess tank",
"score" : 0.034840018
} ]
} ]
}
正如你所看到的,ball tank
和bella tank
建议具有相同分数,尽管我的索引中只存在bella tank
。它似乎并不关心共生符号。
是我在这里唯一选择使用multifields创建name
的非分析版本,还是我这样做是错误的?