Index Configuration
v0.17 introduces a single DiskIVF index type. The polymorphic
IndexIVFFlat / IndexIVFPQ / IndexIVFSQ types from v0.16 have been removed — there is no index_config argument any more. Configuration is expressed as flat keyword arguments to client.create_index.| Parameter | Type | Default | Description |
|---|---|---|---|
dimension | int | None (auto-detect) | Vector dimensionality. Inferred from the first upsert or from embedding_model when omitted. |
metric | str | server default ("euclidean") | "euclidean", "squared_euclidean", or "cosine". |
embedding_model | str | None | Optional sentence-transformers model name for automatic embedding generation. |
storage_precision | str | "float32" | On-disk rerank-vector dtype: "float32" or "float16". |
Key Management
| Parameter | Type | Notes |
|---|---|---|
index_key | bytes | 32-byte encryption key. Used by the SDK-supplied KEK path. Required on every subsequent call for that index. |
kms_name | str | Name of a kms.registry entry in the service YAML. The server generates and wraps the DEK on creation; subsequent calls omit index_key. |
index_key / kms_name must be supplied to create_index. Supplying both against a real-KMS slot is rejected.
Vector Item Format
Dictionary format for upsert operations:Query Result Format
Results returned from query operations:Metadata Filtering
Thefilters parameter in query operations supports MongoDB-style operators:
Supported Operators
$eq: Equality ({"category": "research"})$ne: Not equal ({"status": {"$ne": "draft"}})$gt: Greater than ({"score": {"$gt": 0.8}})$gte: Greater than or equal ({"year": {"$gte": 2020}})$lt: Less than ({"price": {"$lt": 100}})$lte: Less than or equal ({"rating": {"$lte": 4.5}})$in: In array ({"tag": {"$in": ["ai", "ml"]}})$nin: Not in array ({"category": {"$nin": ["spam", "deleted"]}})$and: Logical AND ({"$and": [{"a": 1}, {"b": 2}]})$or: Logical OR ({"$or": [{"x": 1}, {"y": 2}]})
Filter Examples
Field Selection
Many operations support field selection through theinclude parameter:
Available Fields
vector: The vector data itselfcontents: Text or binary content associated with the vectormetadata: Structured metadata objectdistance: Similarity distance (query operations only)
The
id field is always included in query results. Other fields such as distance and metadata are controlled by the include parameter (server default: [] — only id is returned unless include specifies additional fields).Example Usage
Distance Metrics
Supported distance metrics for similarity calculations:cosine: Cosine similarity (recommended for normalized vectors)euclidean: Euclidean distance (L2 norm)squared_euclidean: Squared Euclidean distance (faster than euclidean)