Skip to main content
v0.17 collapsed the embedded family of index types (IVFFlat, IVFPQ, IVFSQ) into a single DiskIVF index type at the service layer. The polymorphic index_config argument is gone — configuration is now expressed as flat parameters on create_index.
CyborgDB Service stores every encrypted index as a DiskIVF index: an inverted-file (IVF) index whose data is persisted by the service’s configured storage backend (memory, disk, or s3). The four knobs you control at create time are: Two more parameters control key management — they are mutually exclusive against a real KMS slot, and at least one must be supplied: See KMS & BYOK for the registry schema and Managing Encryption Keys for the SDK-supplied path.

Distance metric

Python SDK
TypeScript SDK
Go SDK
cURL
Supported values:
  • euclidean — L2 distance. Default if omitted.
  • squared_euclidean — L2 without the square root; faster, ordering identical to euclidean.
  • cosine — cosine distance. Use with normalized vectors.

storage_precision: float32 vs float16

storage_precision selects the dtype used for the on-disk rerank vectors. Reranking happens after IVF candidate retrieval to recover recall; storing rerank vectors at lower precision halves the on-disk footprint with a small recall trade-off.
Python SDK
TypeScript SDK
Go SDK

Automatic embeddings (embedding_model)

Pass a sentence-transformers model name and the server will embed text contents server-side on upsert and query. When embedding_model is set, dimension is inferred from the model and can be omitted.
Python SDK
TypeScript SDK
Go SDK
The Docker service image bundles sentence-transformers. For the pip-installed service, install with pip install 'cyborgdb-service[embeddings]' (or 'cyborgdb-service-cu12[embeddings]' on CUDA hosts).

Training the index

DiskIVF needs to be trained once it has enough vectors. The service auto-triggers training when num_vectors > n_lists * RETRAIN_THRESHOLD (default RETRAIN_THRESHOLD = 10000) — most callers do not need to call train() explicitly. See Train an Encrypted Index for the manual-training path and the tuning knobs (n_lists, batch_size, max_iters, tolerance, max_memory).

API reference

REST API Reference

POST /v1/indexes/create

Python SDK Reference

Client.create_index() in Python

JS/TS SDK Reference

Client.createIndex() in JavaScript/TypeScript

Go SDK Reference

Client.CreateIndex() in Go