elasticsearch,Search,elasticsearch" /> elasticsearch,Search,elasticsearch" />

Search 如何在弹性搜索中查询时发送boost值?

Search 如何在弹性搜索中查询时发送boost值?,search,elasticsearch,Search,elasticsearch,我需要在弹性搜索中向特定查询添加搜索相关性分数。 查询时如何为特定字段添加提升分数?如果您查看 它向您展示了如何在查询时向字段添加boosting。比如说 { "query_string" : { "fields" : ["content", "name^5"], "query" : "this AND that OR thus", "use_dis_max" : true } 但是请注意,这可能会大大降低查询速度,因此我将对其进行测试或在映射文件中使用boos

我需要在弹性搜索中向特定查询添加搜索相关性分数。 查询时如何为特定字段添加提升分数?

如果您查看 它向您展示了如何在查询时向字段添加boosting。比如说

{
    "query_string" : {
    "fields" : ["content", "name^5"],
    "query" : "this AND that OR thus",
    "use_dis_max" : true
}
但是请注意,这可能会大大降低查询速度,因此我将对其进行测试或在映射文件中使用boosting 它向您展示了如何在查询时向字段添加boosting。比如说

{
    "query_string" : {
    "fields" : ["content", "name^5"],
    "query" : "this AND that OR thus",
    "use_dis_max" : true
}
但是请注意,这可能会大大降低查询速度,因此我将对其进行测试或在映射文件中使用boosting