Skip to main content
Loads and connects to an existing encrypted index by name. indexKey is optional in v0.17: SDK-supplied indexes (provider: none) must pass the exact 32-byte key used at creation, while KMS-backed indexes omit it — the service resolves the KEK via the stored KMSBlob.

Parameters

In v0.17 indexKey is optional. KMS-backed indexes (created with kmsName) omit it — the server resolves the DEK via the persisted KMSBlob. SDK-supplied indexes must re-supply the same 32-byte key here.
For SDK-supplied indexes, the encryption key must exactly match the key used during index creation. KMS-backed indexes are tied to their kmsName slot in the service YAML — load fails if that slot is missing or unreachable.

Returns

Promise<EncryptedIndex>: A Promise that resolves to an EncryptedIndex instance ready for vector operations (query, upsert, delete, etc.)

Exceptions

  • Throws if the index doesn’t exist on the server
  • Throws if the encryption key is incorrect or invalid
  • Throws by the server if a KMS-backed index’s slot is unavailable.
  • Throws if the server returns an HTTP error status.
  • Throws if authentication fails (invalid API key).
  • Throws if the CyborgDB service is unavailable or unreachable.
  • Throws if there are internal server errors on the CyborgDB service.

Example Usage