Skip to content
This repository was archived by the owner on Sep 4, 2019. It is now read-only.
iamazy edited this page May 7, 2019 · 1 revision

1. boost打分

像一些查询的通用属性可以在()中最后一个参数中添加,如boost,

select * from fruit query match(h#name,'苹果','prefix_length:21,boost:2.0f') and term(weight,80)

2. boosting打分

--- 第一个参数为positive query, 第二个参数为negative query, 0.2为negative_boost参数
select * from fruit query boosting(h#name='apple',h#weight>100,0.2)

3. function_score打分

select * from fruit query function_score(h#name='a',script_score(h#naame='ddd','fsdfsdf0','a:1,b:2'),random_score(age>90,101092339,'date'),weight(a>1,3),weight(b<4,4),weight(c='aa',5),weight(d is not null,9))

Clone this wiki locally