Skip to content

Commit a080ae6

Browse files
kosabogileemthompo
andauthored
Fixes the indentation of the 'oversample' nested parameter on the knn query page (#133128)
* Fixes indentation * Update docs/reference/query-languages/query-dsl/query-dsl-knn-query.md Co-authored-by: Liam Thompson <[email protected]> * Applies suggestions * Fixes identation --------- Co-authored-by: Liam Thompson <[email protected]>
1 parent 0d736d2 commit a080ae6

File tree

1 file changed

+20
-24
lines changed

1 file changed

+20
-24
lines changed

docs/reference/query-languages/query-dsl/query-dsl-knn-query.md

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -96,39 +96,35 @@ The filter is a pre-filter, meaning that it is applied **during** the approximat
9696
`similarity`
9797
: (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.
9898

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`.
99101

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`
119102

103+
`_name`
104+
: (Optional, string) Name field to identify the query
120105

121-
See [oversampling and rescoring quantized vectors](docs-content://solutions/search/vector/knn.md#dense-vector-knn-search-rescoring) for details.
122106

107+
`rescore_vector` {applies_to}`stack: preview 9.0, ga 9.1`
108+
: (Optional, object) Apply oversampling and rescoring to quantized vectors.
123109

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)
126114

115+
Applies the specified oversample factor to `k` on the approximate kNN search. The approximate kNN search will:
127116

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`
130122

123+
See [oversampling and rescoring quantized vectors](docs-content://solutions/search/vector/knn.md#dense-vector-knn-search-rescoring) for details.
131124

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+
::::
132128

133129
## Pre-filters and post-filters in knn query [knn-query-filtering]
134130

0 commit comments

Comments
 (0)