You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/query-languages/query-dsl/query-dsl-knn-query.md
+20-24Lines changed: 20 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,39 +96,35 @@ The filter is a pre-filter, meaning that it is applied **during** the approximat
96
96
`similarity`
97
97
: (Optional, float) The minimum similarity required for a document to be considered a match. The similarity value calculated relates to the raw [`similarity`](/reference/elasticsearch/mapping-reference/dense-vector.md#dense-vector-similarity) used. Not the document score. The matched documents are then scored according to [`similarity`](/reference/elasticsearch/mapping-reference/dense-vector.md#dense-vector-similarity) and the provided `boost` is applied.
98
98
99
+
`boost`
100
+
: (Optional, float) Floating point number used to multiply the scores of matched documents. This value cannot be negative. Defaults to `1.0`.
99
101
100
-
`rescore_vector` {applies_to}`stack: preview 9.0, ga 9.1`
101
-
: (Optional, object) Apply oversampling and rescoring to quantized vectors.
102
-
103
-
::::{note}
104
-
Rescoring only makes sense for quantized vectors; when [quantization](/reference/elasticsearch/mapping-reference/dense-vector.md#dense-vector-quantization) is not used, the original vectors are used for scoring. Rescore option will be ignored for non-quantized `dense_vector` fields.
105
-
::::
106
-
107
-
108
-
`oversample`
109
-
: (Required, float)
110
-
111
-
Applies the specified oversample factor to `k` on the approximate kNN search. The approximate kNN search will:
112
-
113
-
* Retrieve `num_candidates` candidates per shard.
114
-
* From these candidates, the top `k * oversample` candidates per shard will be rescored using the original vectors.
115
-
* The top `k` rescored candidates will be returned.
116
-
Must be one of the following values:
117
-
* \>= 1f to indicate the oversample factor
118
-
* Exactly `0` to indicate that no oversampling and rescoring should occur. {applies_to}`stack: ga 9.1`
119
102
103
+
`_name`
104
+
: (Optional, string) Name field to identify the query
120
105
121
-
See [oversampling and rescoring quantized vectors](docs-content://solutions/search/vector/knn.md#dense-vector-knn-search-rescoring) for details.
122
106
107
+
`rescore_vector` {applies_to}`stack: preview 9.0, ga 9.1`
108
+
: (Optional, object) Apply oversampling and rescoring to quantized vectors.
123
109
124
-
`boost`
125
-
: (Optional, float) Floating point number used to multiply the scores of matched documents. This value cannot be negative. Defaults to `1.0`.
110
+
**Parameters for `rescore_vector`**:
111
+
112
+
`oversample`
113
+
: (Required, float)
126
114
115
+
Applies the specified oversample factor to `k` on the approximate kNN search. The approximate kNN search will:
127
116
128
-
`_name`
129
-
: (Optional, string) Name field to identify the query
117
+
* Retrieve `num_candidates` candidates per shard.
118
+
* From these candidates, the top `k * oversample` candidates per shard will be rescored using the original vectors.
119
+
* The top `k` rescored candidates will be returned. Must be one of the following values:
120
+
* \>= 1f to indicate the oversample factor
121
+
* Exactly `0` to indicate that no oversampling and rescoring should occur. {applies_to}`stack: ga 9.1`
130
122
123
+
See [oversampling and rescoring quantized vectors](docs-content://solutions/search/vector/knn.md#dense-vector-knn-search-rescoring) for details.
131
124
125
+
::::{note}
126
+
Rescoring only makes sense for [quantized](/reference/elasticsearch/mapping-reference/dense-vector.md#dense-vector-quantization) vectors. The `rescore_vector` option will be ignored for non-quantized `dense_vector` fields, because the original vectors are used for scoring.
127
+
::::
132
128
133
129
## Pre-filters and post-filters in knn query [knn-query-filtering]
0 commit comments