Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion solutions/search/vector/bring-own-vectors.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
7 changes: 4 additions & 3 deletions solutions/search/vector/knn.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading