Skip to main content
Creates a new encrypted DiskIVF vector index. The new index is empty and ready for vector operations.
v0.17 introduces a single DiskIVF index type. The polymorphic IndexIVFFlat / IndexIVFPQ / IndexIVFSQ helpers and the IndexConfig field have been removed — configuration is now expressed as flat fields on CreateIndexParams (Dimension, Metric, StoragePrecision).

Parameters

CreateIndexParams

Key Management Modes

At least one of IndexKey / KmsName must be supplied; supplying both against a real-KMS slot is rejected by the server:
  • SDK-supplied KEK — set IndexKey, leave KmsName nil. The server records the index with provider: none; you must re-supply the same key on every subsequent call.
  • KMS-backed — set KmsName, leave IndexKey nil. The server generates the DEK, wraps it under the named registry slot, and persists the envelope. Subsequent calls omit IndexKey entirely.

Returns

Errors

  • ErrMissingKeyOrKMS — Returned when neither IndexKey nor KmsName is provided.
  • Returns error if IndexKey is provided but is not exactly 32 bytes.
  • Returns error if the index name already exists on the server.
  • Returns error if both IndexKey and KmsName are provided against a real-KMS slot (server-side 400).
  • Returns error if the embedding model is unsupported.
  • Returns error if the CyborgDB service is unavailable or unreachable.
  • Returns error on 5xx responses, including KMS-wrap failures (502).

Example Usage

SDK-supplied key

For more info on GenerateKey, refer to Generate Key.

KMS-backed index

Auto-embedding with cosine metric

Float16 storage for reduced footprint

For more info on auto-generating embeddings, refer to Auto-Generate Embeddings.