From 37f80c8d806575b7aea0df53b3f9348fb9f4d4bb Mon Sep 17 00:00:00 2001 From: Nik Everett Date: Thu, 23 Jan 2014 07:22:39 -0800 Subject: [PATCH] Documentation for score_mode Closes #4742 --- .../reference/search/request/rescore.asciidoc | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/docs/reference/search/request/rescore.asciidoc b/docs/reference/search/request/rescore.asciidoc index 563da4c0143..50112648772 100644 --- a/docs/reference/search/request/rescore.asciidoc +++ b/docs/reference/search/request/rescore.asciidoc @@ -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 <>. -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 <> 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. +|=======================================================================