Skip to main content

is_trained

Returns whether the index has been trained. Returns true only when the training state is Trained. While a (re)train rebuild is in progress this returns false, and queries transparently fall back to the untrained (exhaustive) search path. See is_training and training_state.

is_training

Returns true while a (re)train rebuild is in progress, otherwise false.

training_state

Returns the current training state as a TrainingState enum: Untrained, Training, or Trained.

index_name

Returns the name of the index.

index_type

Returns the type of the index as an IndexType enum. The only value is DISK_IVF.

index_config

Returns a pointer to the index configuration (IndexDiskIVF).

ListIDs

Returns a vector containing all item IDs currently stored in the index.

Parameters

Exceptions

  • std::runtime_error: Thrown if an error occurs during retrieval.

NumVectors

Returns the total number of vectors currently stored in the encrypted index.

Parameters

Returns

size_t: The number of vectors in the index.

Exceptions

  • Throws if the index was not created or loaded yet.
  • Throws if an error occurs while retrieving the count.

Example Usage

index_key is the 32-byte std::array<uint8_t, 32> index KEK and converts implicitly to a KeyContext.