Bugünlerde elasticsearch tamamlama suggester kullanıyorum ve her zaman benzer sonuçlar üretmek bazı sorun var. elasticsearch tamamlama suggester yinelenen sonuç üretir
aşağıdaki deyimi ile arama Say: Yani soru Ben birleştirebilirsiniz nasıl"my_suggestion" : [ {
"text" : "ni",
"offset" : 0,
"length" : 2,
"options" : [ {
"text" : "Nine West",
"score" : 329.0
}, {
"text" : "Nine West ",
"score" : 329.0
}, {
"text" : "Nike",
"score" : 295.0
}, {
"text" : "NINE WEST",
"score" : 168.0
}, {
"text" : "NINE WEST ",
"score" : 168.0
} ]
} ],
veya "DOKUZ BATININ" gibi aynı sonuçları toplamak:
"my_suggestion": {
> "text": "ni",
> "completion": {
> "field": "my_name_for_sug"
> }
> }
Ve aşağıdaki sonuçlar elde ve "DOKUZ WEST".
haritalama geçerli: ik_max_word
"my_name_for_sug": {
"type": "completion"
,"analyzer": "ik_max_word"
,"search_analyzer": "ik_max_word"
,"payloads": true
,"preserve_separators": false
}
bir Çinli özgü analizörü olduğunu ve standart analiz cihazının işi yapabilir.
Teşekkür