Skip to main content

Module flat

Module flat 

Source
Expand description

Flat (brute-force) vector index for small collections.

Simple linear scan over all stored vectors. No graph overhead, exact results. Automatically used when a collection has fewer than DEFAULT_FLAT_INDEX_THRESHOLD vectors (default 10K). Also serves as the search method for growing segments before HNSW construction.

Complexity: O(N × D) per query where N = vectors, D = dimensions.

Structs§

FlatIndex
Flat vector index: append-only buffer with brute-force search.

Constants§

DEFAULT_FLAT_INDEX_THRESHOLD
Default threshold below which collections use flat index instead of HNSW.