Database / Weaviate Vector database Interview questions
What is a Flat index in Weaviate?
A Flat index performs exact, brute-force nearest neighbor search, comparing a query vector against every stored vector directly, with no graph or clustering structure involved. It trades the speed advantage of an approximate index for perfect recall and much lower memory overhead per vector.
vector_index_config=Configure.VectorIndex.flat()
Flat indexes are the right choice specifically for small collections, and for multi-tenant setups where each individual tenant's data is small even if the total collection is large, since brute-force search over a small number of vectors is fast enough in absolute terms that the overhead of building and maintaining an HNSW graph isn't worthwhile. Flat indexes also support RQ and BQ compression, letting a brute-force search scan a compressed representation faster than it could scan full-precision vectors.
More Related questions...