Skip to main content
Loads an existing encrypted index and returns an EncryptedIndex bound to it.

Parameters

For SDK-supplied-key indexes, index_key must be the exact key passed to create_index(). A KMS-backed index fails to load if its kms_name slot is missing from the service YAML or its provider is unreachable, with cyborgdb.AuthenticationError (HTTP 401).

Returns

An EncryptedIndex bound to the loaded index.

Exceptions

index_key is passed but is not 32 bytes. Raised before any request is sent.
No index named index_name exists, or index_key doesn’t match (HTTP 404, in most cases).
index_key doesn’t match an index that has vectors and is already in the service’s cache, or the client’s api_key is missing or invalid; or, for a KMS-backed index, its KMS slot is missing or the provider call fails (HTTP 401).
The service returns 5xx.
The service can’t be reached.
See Errors for the full hierarchy.
A wrong key returns cyborgdb.AuthenticationError (HTTP 401) when the index has vectors and the service already has it cached, and cyborgdb.NotFoundError (HTTP 404) otherwise, for example on an empty index or right after the service restarts. Catch both when checking for a bad key.

Example Usage

SDK-supplied-key index

KMS-backed index