Index Families for ML Systems: Inverted vs Vector Indexes
THE LIFECYCLE CHALLENGE
Building an index once is straightforward. The challenge is managing that index over time as content changes, embeddings are updated, and query volume grows. A static index becomes stale within weeks as new items are added and old embeddings drift.
Production index management requires answering: How do you add new vectors without rebuilding from scratch? How do you handle embedding model updates that invalidate all vectors? How do you scale to billions of vectors across multiple machines?
INDEX BUILD PHASES
Initial build: Compute embeddings for entire corpus, train index structures (IVF centroids, HNSW graph, PQ codebooks). For 100M vectors, expect 2-8 hours depending on index type and hardware.
Validation: Measure recall@K on held-out queries before deployment. If recall is below target (typically 95%), tune index parameters and rebuild.
Deployment: Load index into serving infrastructure. Warm caches with common queries. Route traffic gradually from old to new index.
KEY TRADEOFFS
Build time vs query quality: Spending more time on index training (higher efConstruction for HNSW, more IVF centroids) improves recall but delays deployment.
Update frequency vs freshness: More frequent updates keep content fresh but require more compute and introduce stability risks.