EncryptedIndex bound to it.
Parameters
Returns
Promise<EncryptedIndex> bound to the loaded index.
Exceptions
CyborgDBValidationError
CyborgDBValidationError
indexKey is passed but is not 32 bytes. Thrown before any request is sent.CyborgDBNotFoundError
CyborgDBNotFoundError
No index named
indexName exists, or indexKey doesn’t match (HTTP 404, in most cases).CyborgDBAuthenticationError
CyborgDBAuthenticationError
indexKey doesn’t match an index that has vectors and is already in the service’s cache, or the client’s apiKey is missing or invalid; or, for a KMS-backed index, its KMS slot is missing or the provider call fails (HTTP 401).CyborgDBServiceError
CyborgDBServiceError
The service returns
5xx.CyborgDBTransportError
CyborgDBTransportError
The service can’t be reached.
A wrong key returns
CyborgDBAuthenticationError (HTTP 401) when the index has vectors and the service already has it cached, and CyborgDBNotFoundError (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
Buffer is Node-only; in a browser or Edge runtime, decode the hex string with your own helper.