Skip to main content

GetIndexName

Returns the unique name of the index.
Returns: string - The index name as specified during creation Example:

GetIndexType

Returns the algorithm type of the index.
Returns: string - Index type (“ivf”, “ivfflat”, or “ivfpq”) Example:

IsTrained

Reports whether the index has been optimized through training.
Returns: bool - true if the index has been trained, false otherwise Note: This is a cached value that’s updated automatically when Train() completes successfully. Example:

GetIndexConfig

Returns the detailed configuration of the index.
Returns: internal.IndexConfig - The index configuration, or empty if not available Note: For indexes loaded via LoadIndex(), the configuration may be incomplete. Example:

CheckTrainingStatus

Queries the server to check if the index is currently being trained and updates the cached training status.
Parameters:
  • ctx: context.Context - Context for cancellation and timeouts
Returns:
  • bool - true if the index is currently being trained, false otherwise
  • error - Any error encountered during the status check
Note: This method makes an API call and updates the cached IsTrained() value if training has completed. Example: