2020年2月21日 星期五

[elasticsearch] function score query boost_mode and score_mode

[elasticsearch] function score query boost_mode and score_mode

score_mode function score query 中 的 functions 怎麼合併成score
boost_mode 指的是新的score 怎麼作用在原始的score of the query


```
First, each document is scored by the defined functions. The parameter score_mode specifies how the computed scores are combined:
multiply scores are multiplied (default)
sum scores are summed
avg scores are averaged
first the first function that has a matching filter is applied
max maximum score is used
min minimum score is used
```
```
The newly computed score is combined with the score of the query. The parameter boost_mode defines how:

multiply query score and function score is multiplied (default)
replace only function score is used, the query score is ignored
sum query score and function score are added
avg average
max max of query score and function score
min min of query score and function score

By default, modifying the score does not change which documents match. To exclude documents that do not meet a certain score threshold the min_score parameter can be set to the desired score threshold.
```

Function score query | Elasticsearch Reference [7.6] | Elastic https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html

沒有留言:

張貼留言