From d32e5d4ec3b144e768a482f5a8384bfce0d98b61 Mon Sep 17 00:00:00 2001 From: lcawl Date: Thu, 11 Sep 2025 16:49:42 -0700 Subject: [PATCH 1/2] Update default quantization behaviour --- solutions/search/vector/bring-own-vectors.md | 2 +- solutions/search/vector/knn.md | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/solutions/search/vector/bring-own-vectors.md b/solutions/search/vector/bring-own-vectors.md index a09033c377..8f5efe1a88 100644 --- a/solutions/search/vector/bring-own-vectors.md +++ b/solutions/search/vector/bring-own-vectors.md @@ -43,7 +43,7 @@ Each document in our simple data set will have: * 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. :::{tip} -The `dense_vector` type automatically uses `int8_hnsw` quantization by default to reduce the memory footprint when searching float vectors. Learn how to balance performance and accuracy in [Dense vector quantization](elasticsearch://reference/elasticsearch/mapping-reference/dense-vector.md#dense-vector-quantization). +The `dense_vector` type automatically uses either `bbq_hnsw` or `int8_hnsw` quantization to reduce the memory footprint when searching float vectors. The type of quantization used by default depends on your product version. For details and to learn how to balance performance and accuracy, refer to [Dense vector quantization](elasticsearch://reference/elasticsearch/mapping-reference/dense-vector.md#dense-vector-quantization). ::: The following API request defines the `review_text` and `review_vector` fields: diff --git a/solutions/search/vector/knn.md b/solutions/search/vector/knn.md index af3cd30df8..8a74ede97e 100644 --- a/solutions/search/vector/knn.md +++ b/solutions/search/vector/knn.md @@ -232,10 +232,11 @@ POST byte-image-index/_search 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. ::::{note} -The default index type for `dense_vector` is `int8_hnsw`. +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). :::: -To use quantization, set the `dense_vector` index type to `int8_hnsw` or `int4_hnsw`. +You can use the default quantization strategy or specify an index option. +For example, use `int8_hnsw`: ```console PUT quantized-image-index @@ -286,7 +287,7 @@ PUT quantized-image-index } ``` -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. +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. ```console POST quantized-image-index/_search From 3e3e381c7d6a1fbb668ec55b20aca090bb29ab11 Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Fri, 12 Sep 2025 07:51:11 -0700 Subject: [PATCH 2/2] Update solutions/search/vector/bring-own-vectors.md --- solutions/search/vector/bring-own-vectors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solutions/search/vector/bring-own-vectors.md b/solutions/search/vector/bring-own-vectors.md index 8f5efe1a88..995435ed2f 100644 --- a/solutions/search/vector/bring-own-vectors.md +++ b/solutions/search/vector/bring-own-vectors.md @@ -43,7 +43,7 @@ Each document in our simple data set will have: * 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. :::{tip} -The `dense_vector` type automatically uses either `bbq_hnsw` or `int8_hnsw` quantization to reduce the memory footprint when searching float vectors. The type of quantization used by default depends on your product version. For details and to learn how to balance performance and accuracy, refer to [Dense vector quantization](elasticsearch://reference/elasticsearch/mapping-reference/dense-vector.md#dense-vector-quantization). +The `dense_vector` type automatically uses quantization to reduce the memory footprint when searching float vectors. The type of quantization used by default depends on your product version. For details and to learn how to balance performance and accuracy, refer to [Dense vector quantization](elasticsearch://reference/elasticsearch/mapping-reference/dense-vector.md#dense-vector-quantization). ::: The following API request defines the `review_text` and `review_vector` fields: