v0.17 removes the
GetIndexType and GetIndexConfig methods — there is now a single DiskIVF index type. The Go SDK exposes GetIndexName, IsTrained, IsTraining, and the three describe-backed accessors Dimension, Metric, and NLists.GetIndexName
Returns the unique name of the index. Known at construction — no API call.string - The index name as specified during creation
Example:
Dimension
Returns the vector dimensionality of the index.- Returns the real dimension when
CreateIndexwas called with an explicitDimension, or after the first upsert (auto-detect). - Returns
0when the index was created with auto-detect AND no upsert has happened yet.
ctx:context.Context— context for cancellation and timeouts
int32— vector dimensionerror— any error encountered during the lookup
Metric
Returns the distance metric used by this index:"euclidean", "squared_euclidean", or "cosine".
ctx:context.Context— context for cancellation and timeouts
string— the distance metricerror— any error encountered during the lookup
NLists
Returns the number of inverted lists in the IVF index.- Returns
1for untrained indexes. - Returns the trained cluster count after
Traincompletes.
ctx:context.Context— context for cancellation and timeouts
int32— number of inverted listserror— any error encountered during the lookup
IsTrained
Checks whether the index has been optimized through training. Makes an API call to get the current training status from the server.ctx:context.Context— context for cancellation and timeouts
bool—trueif the index has been trained,falseotherwiseerror— any error encountered during the status check
IsTraining
Queries the server to check if the index is currently being trained (either actively training or queued).ctx:context.Context— context for cancellation and timeouts
bool—trueif the index is currently being trained or queued,falseotherwiseerror— any error encountered during the status check