elasticsearch Elasticsearch-如何更改短语提示器的排序类型';什么是直接发电机?
我正在尝试创建您的意思是使用短语提示功能。当我将我的文本交给术语建议者并按分数对结果进行排序时,我会在基于术语的建议顶部得到最想要的结果。但对我来说,结合这些单独的结果似乎毫无意义,因为我们有短语建议者。然而,当我尝试使用与上一个术语建议器相同的参数的短语建议器时,我并没有得到想要的结果
elasticsearch Elasticsearch-如何更改短语提示器的排序类型';什么是直接发电机?,
elasticsearch,search-engine,search-suggestion,
elasticsearch,Search Engine,Search Suggestion,我正在尝试创建您的意思是使用短语提示功能。当我将我的文本交给术语建议者并按分数对结果进行排序时,我会在基于术语的建议顶部得到最想要的结果。但对我来说,结合这些单独的结果似乎毫无意义,因为我们有短语建议者。然而,当我尝试使用与上一个术语建议器相同的参数的短语建议器时,我并没有得到想要的结果 "my-title-suggestions-3": [ { "text": "devloping", "offset": 0, "length": 9,
"my-title-suggestions-3": [
{
"text": "devloping",
"offset": 0,
"length": 9,
"options": [
{
"text": "developing",
"score": 0.8888889,
"freq": 340
},
{
"text": "deploying",
"score": 0.7777778,
"freq": 24
},
{
"text": "devoting",
"score": 0.75,
"freq": 3
}
]
},
{
"text": "distibutd",
"offset": 10,
"length": 9,
"options": [
{
"text": "distributed",
"score": 0.7777778,
"freq": 32
},
{
"text": "distribute",
"score": 0.7777778,
"freq": 31
}
]
},
{
"text": "saerch",
"offset": 20,
"length": 6,
"options": [
{
"text": "search",
"score": 0.8333333,
"freq": 367
},
{
"text": "speech",
"score": 0.6666666,
"freq": 54
},
{
"text": "sketch",
"score": 0.6666666,
"freq": 11
}
]
},
{
"text": "engies",
"offset": 27,
"length": 6,
"options": [
{
"text": "engines",
"score": 0.8333333,
"freq": 80
},
{
"text": "engine",
"score": 0.6666666,
"freq": 217
},
{
"text": "entries",
"score": 0.6666666,
"freq": 15
}
]
}
]
上面显示了术语频率和从术语建议者处获得的分数
下面是我从第一句中得到的:
"suggest": {
"simple_phrase": [
{
"text": "devloping distibutd saerch engies",
"offset": 0,
"length": 33,
"options": [
{
"text": "developing distributed search engine",
"highlighted": "<em>developing distributed search engine</em>",
"score": 8.401011e-8
},
{
"text": "developing distribute search engine",
"highlighted": "<em>developing distribute search engine</em>",
"score": 6.85284e-8
},
{
"text": "developing distributed search engines",
"highlighted": "<em>developing distributed search engines</em>",
"score": 5.546362e-8
},
{
"text": "developing distribute search engines",
"highlighted": "<em>developing distribute search engines</em>",
"score": 5.2338663e-8
},
{
"text": "developing distributed speech engine",
"highlighted": "<em>developing distributed speech engine</em>",
"score": 3.586202e-8
}
]
}
]
“建议”:{
“简单短语”:[
{
“文本”:“开发分布的saerch engies”,
“偏移量”:0,
“长度”:33,
“选择”:[
{
“正文”:“开发分布式搜索引擎”,
“突出显示”:“开发分布式搜索引擎”,
“分数”:8.401011e-8
},
{
“正文”:“开发分布式搜索引擎”,
“突出显示”:“开发分布式搜索引擎”,
“分数”:6.85284e-8
},
{
“文本”:“开发分布式搜索引擎”,
“突出显示”:“开发分布式搜索引擎”,
“分数”:5.546362e-8
},
{
“文本”:“开发分布式搜索引擎”,
“突出显示”:“开发分布式搜索引擎”,
“分数”:5.2338663e-8
},
{
“文本”:“开发分布式语音引擎”,
“突出显示”:“开发分布式语音引擎”,
“分数”:3.586202e-8
}
]
}
]
短语建议者似乎使用术语频率来组合来自直接建议者的内容。但是,正如您在上文中所看到的,这并不是想要的结果,在这种情况下,真正好的建议排在第三位。有没有办法改变这种行为,并结合基于术语的建议在短语建议中的得分斯特