Documentation for score_mode

Closes #4742
This commit is contained in:
Nik Everett 2014-01-23 07:22:39 -08:00 committed by Adrien Grand
parent 55e8df40cd
commit 37f80c8d80
1 changed files with 16 additions and 4 deletions

View File

@ -28,10 +28,10 @@ number of docs which will be examined on each shard can be controlled by
the `window_size` parameter, which defaults to
<<search-request-from-size,`from` and `size`>>.
The scores from the original query and the rescore query are combined
linearly to produce the final `_score` for each document. The relative
importance of the original query and of the rescore query can be
controlled with the `query_weight` and `rescore_query_weight`
By default the scores from the original query and the rescore query are
combined linearly to produce the final `_score` for each document. The
relative importance of the original query and of the rescore query can
be controlled with the `query_weight` and `rescore_query_weight`
respectively. Both default to `1`.
For example:
@ -67,3 +67,15 @@ curl -s -XPOST 'localhost:9200/_search' -d '{
}
'
--------------------------------------------------
The way the scores are combined can be controled with the `score_mode`:
[cols="<,<",options="header",]
|=======================================================================
|Score Mode |Description
|`total` |Add the original score and the rescore query score. The default.
|`multiply` |Multiply the original score by the rescore query score. Useful
for <<query-dsl-function-score-query,`function query`>> rescores.
|`avg` |Average the original score and the rescore query score.
|`max` |Take the max of original score and the rescore query score.
|`min` |Take the min of the original score and the rescore query score.
|=======================================================================