如何将re-score插件应用于elasticsearch查询

时间:2018-04-07 07:08:32

标签: elasticsearch elasticsearch-plugin

有rescore插件实现示例 https://github.com/elastic/elasticsearch/tree/master/plugins/examples/rescore 由ES社区提供

问题是如何将其应用于查询?

1 个答案:

答案 0 :(得分:1)

GET test-idx/_search
{
    "query": {
        "match" : {
            "fullName" : "some-name"
        }
    },
    "rescore" : {
        "window_size" : 2,
        "example" : {        //check this line
             "factor":2.0
         }
    }
}