我有一个名为search_suggest的字段,其中包含以下内容
search_suggest: {
type: "completion",
analyzer: "simple",
payloads: true,
preserve_separators: false,
preserve_position_increments: false,
max_input_length: 50
}
Run Code Online (Sandbox Code Playgroud)
它的值索引为
{
input: [
"apple iphone 6"
],
output: "apple iphone 6",
weight: 5,
payload: {
category: "mobiles"
}
}
Run Code Online (Sandbox Code Playgroud)
如果我搜索苹果,它会给我结果。但是,如果我搜索 iphone,它不会给我任何结果。
完成建议有什么方法可以做到这一点?我是否必须将输入索引为
我知道 edge-ngram 建议者。但缺点是它也会建议重复。
请帮忙。