[DOCS] Tidied up function score
This commit is contained in:
parent
422eed7985
commit
c2eb4a1c40
|
@ -29,7 +29,7 @@ by the query.
|
||||||
"(query|filter)": {},
|
"(query|filter)": {},
|
||||||
"boost": "boost for the whole query",
|
"boost": "boost for the whole query",
|
||||||
"FUNCTION": {},
|
"FUNCTION": {},
|
||||||
"boost_mode":"(mult|replace|...)"
|
"boost_mode":"(multiply|replace|...)"
|
||||||
}
|
}
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
|
|
||||||
|
@ -52,8 +52,8 @@ given filter:
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"max_boost": number,
|
"max_boost": number,
|
||||||
"score_mode": "(mult|max|...)",
|
"score_mode": "(multiply|max|...)",
|
||||||
"boost_mode": "(mult|replace|...)"
|
"boost_mode": "(multiply|replace|...)"
|
||||||
}
|
}
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
|
|
||||||
|
@ -78,6 +78,7 @@ the `max_boost` parameter. The default for `max_boost` is FLT_MAX.
|
||||||
Finally, the newly computed score is combined with the score of the
|
Finally, the newly computed score is combined with the score of the
|
||||||
query. The parameter `boost_mode` defines how:
|
query. The parameter `boost_mode` defines how:
|
||||||
|
|
||||||
|
[horizontal]
|
||||||
`multiply`:: query score and function score is multiplied (default)
|
`multiply`:: query score and function score is multiplied (default)
|
||||||
`replace`:: only function score is used, the query score is ignored
|
`replace`:: only function score is used, the query score is ignored
|
||||||
`sum`:: query score and function score are added
|
`sum`:: query score and function score are added
|
||||||
|
@ -180,15 +181,16 @@ decay function is specified as
|
||||||
where `DECAY_FUNCTION` can be "linear", "exp" and "gauss" (see below).
|
where `DECAY_FUNCTION` can be "linear", "exp" and "gauss" (see below).
|
||||||
The `offset` and `decay` parameters are optional.
|
The `offset` and `decay` parameters are optional.
|
||||||
|
|
||||||
|
[horizontal]
|
||||||
`offset`::
|
`offset`::
|
||||||
If an `offset` is defined, the decay function will only compute a the
|
If an `offset` is defined, the decay function will only compute a the
|
||||||
decay function for documents with a distance greater that the defined
|
decay function for documents with a distance greater that the defined
|
||||||
`offset`. The default is 0.
|
`offset`. The default is 0.
|
||||||
`decay`::
|
|
||||||
|
|
||||||
The `decay` parameter defines how documents are scored at the distance
|
`decay`::
|
||||||
given at `scale`. If no `decay` is defined, documents at the distance
|
The `decay` parameter defines how documents are scored at the distance
|
||||||
`scale` will be scored 0.5.
|
given at `scale`. If no `decay` is defined, documents at the distance
|
||||||
|
`scale` will be scored 0.5.
|
||||||
|
|
||||||
For example, your documents might represents hotels and contain a geo
|
For example, your documents might represents hotels and contain a geo
|
||||||
location field. You want to compute a decay function depending on how
|
location field. You want to compute a decay function depending on how
|
||||||
|
|
Loading…
Reference in New Issue