4. IndexConfig() Reference 🧩

IndexConfig is the SDK object that holds all index-related settings in one place: identity (name, dimension), key management, and crypto/search presets. You can build it directly, or let the helpers (ev.init_index_config(...) + ev.create_index(...)) construct and use it for you.

When to use

  • You want a single, explicit object to pass around across functions or tests.

  • You need to clone/adjust configuration safely (e.g., same key_path, different index_name or dim).

Constructor (most-used fields)

  • Identity

    • index_name (str): Unique name of the index

    • dim (int): Vector dimension (max 4096)

  • Key management

    • key_path (str): Base directory for key sets

    • key_id (str): ID for a key set under key_path

    • metadata_encryption (bool): Encrypt metadata at rest/in transit

    • seal_mode ("none" | "aes"): Seal secret/materialized keys at rest

    • seal_kek_path (str): File path to KEK when seal_mode='aes'

    • key_store ("local" | "aws"): Store keys on the filesystem or upload/load them via AWS (requires region_name, bucket_name, secret_prefix)

  • Presets and modes

    • preset ("ip"): Crypto preset (inner-product optimized)

    • eval_mode ("rmp" | "mm"): Evaluation mode on server. Use rmp for both plaintext and encrypted queries. mm is advanced and currently does not support encrypted queries (query_encryption="cipher").

    • index_type ("flat"): Index structure

    • query_encryption ("plain" | "cipher"): Encrypt queries

    • index_encryption ("cipher"): Always encrypted storage

See details in:

  1. πŸ”‘ Key Management: key_path, key_id, metadata_encryption, seal_mode, seal_kek_path, key_store, region_name, bucket_name, secret_prefix

  2. πŸš€ Presets: preset, eval_mode, index_type, query_encryption, index_encryption

Example: Build and create via class

Example: Helpers that use IndexConfig under the hood

Clone/adjust safely

Notes

  • All vectors inserted into an index must match the configured dim.

  • index_encryption is always "cipher" in enVector.

  • Max supported dimension is 4096.

Last updated