Skip to content

Commit 33564d0

Browse files
authored
Update default quantization behaviour (#2925)
1 parent a7b86f1 commit 33564d0

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

solutions/search/vector/bring-own-vectors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Each document in our simple data set will have:
4545
* An embedding of that review: stored in a `review_vector` field, which is defined as a [`dense_vector`](elasticsearch://reference/elasticsearch/mapping-reference/dense-vector.md) data type.
4646

4747
:::{tip}
48-
The `dense_vector` type automatically uses quantization by default to reduce the memory footprint when searching float vectors.
48+
The `dense_vector` type automatically uses quantization to reduce the memory footprint when searching float vectors.
4949
Learn more about the default quantization strategy and balancing performance and accuracy in [Dense vector field type](elasticsearch://reference/elasticsearch/mapping-reference/dense-vector.md).
5050
:::
5151

solutions/search/vector/knn.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,11 @@ POST byte-image-index/_search
237237
If you want to provide `float` vectors but still get the memory savings of `byte` vectors, use the [quantization](elasticsearch://reference/elasticsearch/mapping-reference/dense-vector.md#dense-vector-quantization) feature. Quantization allows you to provide `float` vectors, but internally they are indexed as `byte` vectors. Additionally, the original `float` vectors are still retained in the index.
238238

239239
::::{note}
240-
The default index type for `dense_vector` is `int8_hnsw`.
240+
The default index type for `dense_vector` is either `bbq_hnsw` or `int8_hnsw`, depending on your product version. Refer to [Dense vector field type](elasticsearch://reference/elasticsearch/mapping-reference/dense-vector.md).
241241
::::
242242

243-
To use quantization, set the `dense_vector` index type to `int8_hnsw` or `int4_hnsw`.
243+
You can use the default quantization strategy or specify an index option.
244+
For example, use `int8_hnsw`:
244245

245246
```console
246247
PUT quantized-image-index
@@ -291,7 +292,7 @@ PUT quantized-image-index
291292
}
292293
```
293294

294-
Because the original `float` vectors are retained alongside the quantized index, you can use them for re-scoring: retrieve candidates quickly via the `int8_hnsw` (or `int4_hnsw`) index, then rescore the top `k` hits using the original `float` vectors. This provides the best of both worlds, fast search and accurate scoring.
295+
Because the original `float` vectors are retained alongside the quantized index, you can use them for re-scoring: retrieve candidates quickly via the `int8_hnsw` index, then rescore the top `k` hits using the original `float` vectors. This provides the best of both worlds, fast search and accurate scoring.
295296

296297
```console
297298
POST quantized-image-index/_search

0 commit comments

Comments
 (0)