0
我有一个域名为标题具有以下映射。Elasticsearch术语提示器不按预期方式工作
{
"title": {
"type": "string"
}
执行拼写检查术语提示器时,它没有按预期给出结果。
对于查询联想a1000,它返回结果如下。
[spell_suggestion] => Array
(
[0] => Array
(
[text] => lenovo
[offset] => 0
[length] => 6
[options] => Array
(
)
)
[1] => Array
(
[text] => a1000
[offset] => 7
[length] => 5
[options] => Array
(
[0] => Array
(
[text] => a1018
[score] => 0.6
[freq] => 1
)
[1] => Array
(
[text] => a102
[score] => 0.5
[freq] => 1
)
[2] => Array
(
[text] => a104
[score] => 0.5
[freq] => 1
)
[3] => Array
(
[text] => a108
[score] => 0.5
[freq] => 1
)
)
)
)
)
但索引具有包含联想A1000标题。
我正在使用以下查询进行拼写检查。
{
"spell_suggestion": {
"text": "lenovo a1000",
"term": {
"field": "title",
"sort": "score",
"prefix_length": 3
}
}
}
为什么elasticsearch不会返回索引中已有的术语。 我做错了什么或失踪?请建议。
我试过了也。但也没有给出已经存在于索引中的文本。 –