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
| Parameter | Type | Description |
|---|---|---|
indexName | string | Name of the existing index to load |
indexKey | Uint8Array | (Optional) The exact 32-byte encryption key used when creating the index. Required for indexes created with the SDK-supplied KEK path (provider: none); omit for KMS-backed indexes. |
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.Returns
Promise<EncryptedIndex>: A Promise that resolves to an EncryptedIndex instance ready for vector operations (query, upsert, delete, etc.)
Exceptions
Error
Error
- 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).
Service Errors
Service Errors
- Throws if the CyborgDB service is unavailable or unreachable.
- Throws if there are internal server errors on the CyborgDB service.