如何编写带有负提升的查询?
How do I write a query with a negative boost?
ElasticSearch API 表示您可以创建 negative boosts to demote results. How does one do this in Searchkick? Do I need to use the advanced query 工具?还是我遗漏了某个选项?
Searchkick 没有负面提升的选项,因此您需要使用高级查询。不过,我很高兴接受它的拉取请求。
值得注意的是function_weight
是一个浮点数,因此您可以使用负浮点数来进行负提升。
这意味着您可以使用带有负值的 boost_where
来根据字段降级结果。
ElasticSearch API 表示您可以创建 negative boosts to demote results. How does one do this in Searchkick? Do I need to use the advanced query 工具?还是我遗漏了某个选项?
Searchkick 没有负面提升的选项,因此您需要使用高级查询。不过,我很高兴接受它的拉取请求。
值得注意的是function_weight
是一个浮点数,因此您可以使用负浮点数来进行负提升。
这意味着您可以使用带有负值的 boost_where
来根据字段降级结果。