Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Indexes

VSAG ships a family of index implementations that share a single builder-style API, one serialization format, and one set of operations (Build, Add, KnnSearch, RangeSearch, Remove, Serialize / Deserialize, …). They differ in the data structures and trade-offs they use under the hood.

The pages in this section cover the actively developed indexes:

IndexPageBest for
hgraphHGraphGeneral-purpose, high-recall graph with rich quantization options
ivfIVFPartition-based search, high-throughput batch queries, large corpora
sindiSINDISparse vectors (BM25 / learned sparse) on inner-product
pyramidPyramidMulti-tenant or tag-partitioned corpora with hierarchical paths

brute_force is also available as an exact-search baseline (see Creating an Index and examples/cpp/105_index_brute_force.cpp).

hnsw and diskann are retained for backward compatibility but are deprecated; new deployments should prefer hgraph (graph-based) or ivf (partition-based) instead.

Parameter conventions

All indexes share the same top-level build fields:

FieldValuesNotes
dimpositive integerVector dimensionality; fixed after build
dtypefloat32 / float16 / bfloat16 / int8 / sparsesparse is SINDI only
metric_typel2 / ip / cosineMust match at query time (SINDI is ip only)

Index-specific build parameters live under the index_param sub-object; search-time parameters live under a sub-object named after the index (e.g. hgraph, ivf, sindi, pyramid). Concrete schemas are documented on each page and enumerated in Index Parameters.