【发布时间】:2015-11-21 18:51:55
【问题描述】:
当我请求建议者时
{
"my-title-suggestions-1": {
"text": "tücher ",
"term": {
"field": "name",
}
},
"my-title-suggestions-2": {
"text": "tüchers ",
"term": {
"field": "name"
}
}
}
返回
{
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"my-title-suggestions-1": [
{
"text": "tücher",
"offset": 0,
"length": 6,
"options": []
}
],
"my-title-suggestions-2": [
{
"text": "tüchers",
"offset": 0,
"length": 7,
"options": [
{
"text": "tücher",
"score": 0.8333333,
"freq": 6
}
]
}
]
}
我想知道为什么它不返回与第一个建议者的完全匹配? 第二个建议者显然有这个结果。
我可以添加其他选项来解决此问题吗?
编辑: 最小的映射就是这样...
{
"name" : {
"analyzer" : "standard",
"type" : "string"
}
}
【问题讨论】:
-
你也可以发布索引映射吗?
-
@madsen 映射的具体结构应该是无关紧要的......它有一个名为 name 的字符串字段......但是我添加了映射
-
字段是否经过分析、过滤和/或标记化不一定无关紧要。
-
我目前有同样的问题。这是相关的issue 和pull request。目前已打开,但似乎已准备好合并。
标签: elasticsearch search-suggestion