|
@@ -4,7 +4,7 @@
|
|
|
<titleabbrev>Distance feature</titleabbrev>
|
|
|
++++
|
|
|
|
|
|
-Boosts the <<query-filter-context, relevance score>> of documents closer to a
|
|
|
+Boosts the <<relevance-scores,relevance score>> of documents closer to a
|
|
|
provided `origin` date or point. For example, you can use this query to give
|
|
|
more weight to documents closer to a certain date or location.
|
|
|
|
|
@@ -196,7 +196,7 @@ must be a <<distance-units,distance unit>>, such as `1km` or `12m`.
|
|
|
+
|
|
|
--
|
|
|
(Optional, float) Floating point number used to multiply the
|
|
|
-<<query-filter-context, relevance score>> of matching documents. This value
|
|
|
+<<relevance-scores,relevance score>> of matching documents. This value
|
|
|
cannot be negative. Defaults to `1.0`.
|
|
|
--
|
|
|
|
|
@@ -208,11 +208,11 @@ cannot be negative. Defaults to `1.0`.
|
|
|
===== How the `distance_feature` query calculates relevance scores
|
|
|
The `distance_feature` query dynamically calculates the distance between the
|
|
|
`origin` value and a document's field values. It then uses this distance as a
|
|
|
-feature to boost the <<query-filter-context, relevance score>> of closer
|
|
|
+feature to boost the <<relevance-scores,relevance score>> of closer
|
|
|
documents.
|
|
|
|
|
|
-The `distance_feature` query calculates a document's <<query-filter-context,
|
|
|
-relevance score>> as follows:
|
|
|
+The `distance_feature` query calculates a document's
|
|
|
+<<relevance-scores,relevance score>> as follows:
|
|
|
|
|
|
```
|
|
|
relevance score = boost * pivot / (pivot + distance)
|
|
@@ -224,6 +224,6 @@ document's field value.
|
|
|
[[distance-feature-skip-hits]]
|
|
|
===== Skip non-competitive hits
|
|
|
Unlike the <<query-dsl-function-score-query,`function_score`>> query or other
|
|
|
-ways to change <<query-filter-context, relevance scores>>, the
|
|
|
+ways to change <<relevance-scores,relevance scores>>, the
|
|
|
`distance_feature` query efficiently skips non-competitive hits when the
|
|
|
<<search-uri-request,`track_total_hits`>> parameter is **not** `true`.
|