Zvec Logo

Flat Index

The Gold Standard for Exact Similarity Search

How It Works

Performs an exact (brute-force) similarity search by comparing the query vector against every vector in the dataset.

When to Use a Flat Index

  • ✅ Small datasets
  • ✅ Prototyping and experimentation
  • ✅ Evaluation baselines
  • ✅ Scenarios where 100% recall is non-negotiable

Best Practice: Start with Flat Index during development and testing — it’s your reliability anchor. Once you validate your approach, consider approximate indexes (like HNSW) for production-scale performance. Use the Flat index when working with tiny datasets where correctness outweighs speed.

Advantages

  1. Perfect Recall Guarantee — Finds true nearest neighbors
  2. Zero Configuration — Simple setup with no tuning required
  3. Instant Indexing — Build time is virtually immediate

Limitations

⚠️ Search latency grows linearly with dataset size — making it impractical for large-scale workloads.