IndexConfig/IndexIVF* variants have been removed.
Parameters
| Parameter | Type | Description |
|---|---|---|
index_name | std::string | Name of the index to create (must be unique). |
index_key | std::array<uint8_t, 32> | 32-byte encryption key (KEK) for the index, used to secure index data. |
index_config | IndexDiskIVF | (Overload 2 only) DiskIVF configuration (dimension, storage precision, embedding model). When omitted (overload 1), a default DiskIVF config is used and dimension is auto-detected from the first upsert. |
metric | std::optional<DistanceMetric> | (Optional) Distance metric to override the one set in index_config (default is std::nullopt). |
logger | cyborg::Logger* | (Optional) Pointer to a logger instance for capturing operation logs (default is nullptr). |
Returns
std::unique_ptr<cyborg::EncryptedIndex>: A pointer to the newly created index (EncryptedIndex).
Exceptions
std::invalid_argument
std::invalid_argument
- Throws if the index name is not unique.
- Throws if the index configuration is invalid.
std::runtime_error
std::runtime_error
- Throws if the index could not be created.