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

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Vector index type now supports sparse option
  • Loading branch information
Simran-B committed Aug 21, 2025
commit 5d18a9f8cc6fd0ff473e745578dc3c1ebd1526f2
9 changes: 8 additions & 1 deletion site/content/3.12/develop/http-api/indexes/vector.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,21 @@ paths:
A list with exactly one attribute path to specify
where the vector embedding is stored in each document. The vector data needs
to be populated before creating the index.

If you want to index another vector embedding attribute, you need to create a
separate vector index.
type: array
minItems: 1
maxItems: 1
items:
type: string
sparse:
description: |
Whether to create a sparse index that excludes documents with
the attribute for indexing missing or set to `null`. This
attribute is defined by `fields`.
type: boolean
default: false
parallelism:
description: |
The number of threads to use for indexing.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,18 @@ centroids and the quality of vector search thus degrades.
- **fields** (array of strings): A list with a single attribute path to specify
where the vector embedding is stored in each document. The vector data needs
to be populated before creating the index.

If you want to index another vector embedding attribute, you need to create a
separate vector index.
- **sparse** (boolean): Whether to create a sparse index that excludes documents
with the attribute for indexing missing or set to `null`. This attribute is
defined by `fields`. Default: `false`.
- **parallelism** (number):
The number of threads to use for indexing. The default is `2`.
The number of threads to use for indexing. Default: `2`.
- **inBackground** (boolean):
Set this option to `true` to keep the collection/shards available for
write operations by not using an exclusive write lock for the duration
of the index creation. The default is `false`.
of the index creation. Default: `false`.
- **params**: The parameters as used by the Faiss library.
- **metric** (string): Whether to use `cosine` or `l2` (Euclidean) distance calculation.
- **dimension** (number): The vector dimension. The attribute to index needs to
Expand All @@ -89,11 +92,11 @@ centroids and the quality of vector search thus degrades.
number of documents.
- **defaultNProbe** (number, _optional_): How many neighboring centroids to
consider for the search results by default. The larger the number, the slower
the search but the better the search results. The default is `1`. You should
the search but the better the search results. Default: `1`. You should
generally use a higher value here or per query via the `nProbe` option of
the vector similarity functions.
- **trainingIterations** (number, _optional_): The number of iterations in the
training process. The default is `25`. Smaller values lead to a faster index
training process. Default: `25`. Smaller values lead to a faster index
creation but may yield worse search results.
- **factory** (string, _optional_): You can specify an index factory string that is
forwarded to the underlying Faiss library, allowing you to combine different
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1443,6 +1443,13 @@ utilizing vector indexes in queries.
Furthermore, a new error code `ERROR_QUERY_VECTOR_SEARCH_NOT_APPLIED` (1554)
has been added.

---

<small>Introduced in: v3.12.6</small>

Vector indexes can now be sparse to exclude documents with the embedding attribute
for indexing missing or set to `null`.

## Server options

### Effective and available startup options
Expand Down
9 changes: 8 additions & 1 deletion site/content/3.13/develop/http-api/indexes/vector.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,21 @@ paths:
A list with exactly one attribute path to specify
where the vector embedding is stored in each document. The vector data needs
to be populated before creating the index.

If you want to index another vector embedding attribute, you need to create a
separate vector index.
type: array
minItems: 1
maxItems: 1
items:
type: string
sparse:
description: |
Whether to create a sparse index that excludes documents with
the attribute for indexing missing or set to `null`. This
attribute is defined by `fields`.
type: boolean
default: false
parallelism:
description: |
The number of threads to use for indexing.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,18 @@ centroids and the quality of vector search thus degrades.
- **fields** (array of strings): A list with a single attribute path to specify
where the vector embedding is stored in each document. The vector data needs
to be populated before creating the index.

If you want to index another vector embedding attribute, you need to create a
separate vector index.
- **sparse** (boolean): Whether to create a sparse index that excludes documents
with the attribute for indexing missing or set to `null`. This attribute is
defined by `fields`. Default: `false`.
- **parallelism** (number):
The number of threads to use for indexing. The default is `2`.
The number of threads to use for indexing. Default: `2`.
- **inBackground** (boolean):
Set this option to `true` to keep the collection/shards available for
write operations by not using an exclusive write lock for the duration
of the index creation. The default is `false`.
of the index creation. Default: `false`.
- **params**: The parameters as used by the Faiss library.
- **metric** (string): Whether to use `cosine` or `l2` (Euclidean) distance calculation.
- **dimension** (number): The vector dimension. The attribute to index needs to
Expand All @@ -89,11 +92,11 @@ centroids and the quality of vector search thus degrades.
number of documents.
- **defaultNProbe** (number, _optional_): How many neighboring centroids to
consider for the search results by default. The larger the number, the slower
the search but the better the search results. The default is `1`. You should
the search but the better the search results. Default: `1`. You should
generally use a higher value here or per query via the `nProbe` option of
the vector similarity functions.
- **trainingIterations** (number, _optional_): The number of iterations in the
training process. The default is `25`. Smaller values lead to a faster index
training process. Default: `25`. Smaller values lead to a faster index
creation but may yield worse search results.
- **factory** (string, _optional_): You can specify an index factory string that is
forwarded to the underlying Faiss library, allowing you to combine different
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1443,6 +1443,13 @@ utilizing vector indexes in queries.
Furthermore, a new error code `ERROR_QUERY_VECTOR_SEARCH_NOT_APPLIED` (1554)
has been added.

---

<small>Introduced in: v3.12.6</small>

Vector indexes can now be sparse to exclude documents with the embedding attribute
for indexing missing or set to `null`.

## Server options

### Effective and available startup options
Expand Down