Parameters
| Parameter | Type | Description | 
|---|---|---|
index_name | str | Name of the index to create. Must be unique. | 
index_key | bytes | 32-byte encryption key for the index, used to secure the index data. | 
index_config | IndexConfig | Configuration dictionary specifying the index type (ivf, ivfpq, or ivfflat) and relevant parameters such as dimension, n_lists, pq_dim, and pq_bits. | 
embedding_model | str | (Optional) Which sentence-transfomers model used to auto-generate embeddings. Defaults to None, no auto-generation. | 
max_cache_size | int | (Optional) Maximum size of local cache to keep for encrypted index. Defaults to 0. | 
For more info on auto-generating embeddings, refer to Auto-Generate Embeddings.
Returns
EncryptedIndex: An instance of the newly created encrypted index.
Exceptions
ValueError
ValueError
- Throws if the index name is not unique.
 - Throws if the index configuration is invalid.
 
RuntimeError
RuntimeError
- Throws if the index could not be created.