Skip to main content
Loads and returns an existing EncryptedIndex instance based on its name and key.

Parameters

The encryption key must exactly match the key used during index creation.

Returns

An instance of EncryptedIndex if the index exists and the key is valid.

Exceptions

  • Throws if the index doesn’t exist on the server
  • Throws if the encryption key is incorrect or invalid
  • Throws if the encryption key is not exactly 32 bytes
  • Throws if authentication fails (invalid API key)
  • Throws if the API request fails due to network issues
  • Throws if the server returns an HTTP error status
  • Throws if the server is unreachable or times out

Example Usage

Basic usage of the load_index method to retrieve an existing index: