Versions in this module Expand all Collapse all v1 v1.0.0 Mar 28, 2026 Changes in this version + var ErrIndexClosed = errors.New("index is closed") + type HnswIndex struct + func Load(location string, spaceType SpaceType, dim int, maxElements uint64, ...) (*HnswIndex, error) + func New(dim, M, efConstruction, randSeed int, maxElements uint64, spaceType SpaceType, ...) (*HnswIndex, error) + func (idx *HnswIndex) AddPoints(vectors [][]float32, labels []uint64, concurrency int, replaceDeleted bool) error + func (idx *HnswIndex) Free() + func (idx *HnswIndex) GetAllowReplaceDeleted() (bool, error) + func (idx *HnswIndex) GetCurrentCount() (uint64, error) + func (idx *HnswIndex) GetDataByLabel(label uint64) ([]float32, error) + func (idx *HnswIndex) GetMaxElements() (uint64, error) + func (idx *HnswIndex) IndexFileSize() (uint64, error) + func (idx *HnswIndex) MarkDeleted(label uint64) error + func (idx *HnswIndex) ResizeIndex(newSize uint64) error + func (idx *HnswIndex) Save(location string) error + func (idx *HnswIndex) SearchKNN(vectors [][]float32, topK int, concurrency int) ([][]*SearchResult, error) + func (idx *HnswIndex) SetEf(ef int) error + func (idx *HnswIndex) UnmarkDeleted(label uint64) error + type SearchResult struct + Distance float32 + Label uint64 + type SpaceType int + const Cosine + const IP + const L2