EncryptedIndex bound to it.
There is one index type, configured with flat keyword arguments. The earlier
IndexIVFFlat, IndexIVFPQ, and IndexIVFSQ types and the index_config argument no longer exist.Parameters
Key management
Pass exactly one ofindex_key or kms_name. The service rejects both together with ValidationError (HTTP 400), whatever the KMS provider.
- SDK-supplied KEK: pass
index_key. Supply the same key again on everyload_index(). - KMS-backed: pass
kms_name. The service generates the key, wraps it with the named provider, and stores the wrapped key. Later calls omitindex_key.
Storage precision
storage_precision sets the format used to store the index’s vector embeddings. Every value works with every metric.
The
tq* values are TurboQuant tiers; lower tiers use less storage in exchange for a small recall and latency cost.
Metadata schema
metadata_schema sets how each metadata field is indexed. Metadata itself stays schemaless: this controls indexing, not what may be stored. Fields left out get the default policy (indexed and filterable). Nested fields use dot-paths such as "loc.city".
Filters the index cannot answer
The index can answer a filter when the field is filterable and, for$regex or $contains, the field also has pattern set. Any other filter is handled differently depending on the call:
With the schema above:
metadata_schema getter.
Returns
AnEncryptedIndex bound to the new index. For KMS-backed indexes it holds no plaintext key.
Exceptions
cyborgdb.ValidationError
cyborgdb.ValidationError
Before any request is sent: neither
index_key nor kms_name is passed, index_key is not 32 bytes, or storage_precision is not one of the six values above. From the service: the index name already exists, both index_key and kms_name were passed, or the kms_name slot is unknown (HTTP 400); or metadata_schema combines settings that aren’t allowed (HTTP 422).cyborgdb.AuthenticationError
cyborgdb.AuthenticationError
The client’s
api_key is missing or invalid (HTTP 401), or is a per-user key: creating an index requires the root key (HTTP 403).cyborgdb.ServiceError
cyborgdb.ServiceError
The service returns
5xx, including KMS wrap failures (502).cyborgdb.TransportError
cyborgdb.TransportError
The service can’t be reached.
Example Usage
SDK-supplied key
Store
index_key securely: it is needed to load the index again. See Generate Key.