EncryptedIndex.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
index_name | str | - | Name of the index to load. |
index_key | bytes | - | 32-byte encryption key. For a normal load this is the index KEK used during create_index(). For an RBAC user-scoped load (user_id set), this is that user’s 32-byte KEK. |
logger | Logger | None | (Optional) Logger instance for capturing operation logs. |
user_id | bytes | None | None | (Optional, keyword-only) 16-byte RBAC user identifier. When set, the index is loaded scoped to that user and index_key is interpreted as the user’s KEK; per-operation permissions are enforced. |
RBAC user keys are minted by the root KEK holder via
create_user_keys. A user then loads with load_index(name, their_user_kek, user_id=their_id). See access control.Returns
EncryptedIndex: An instance of the loaded encrypted index.
Exceptions
ValueError
ValueError
- Throws if the index name does not exist.
RuntimeError
RuntimeError
- Throws if the index could not be loaded or decrypted.