Exact search stopped fitting
Search compares the query against every vector in the collection. At 50,000 documents that was 20ms and nobody thought about it. At 20 million it is several seconds, because the work grows with the collection — every query reads everything.
Users will not wait. The question is what you are willing to give up.
Choose the index for a 20M-vector collection that must answer in tens of milliseconds.
Components — tap one, then tap a slot on the diagram
!Search was twenty milliseconds at fifty thousand documents. At twenty million it's four seconds.
Outside every boundary: 20M vectors (and growing; FAILED: 4s per query), Query vector, an empty slot for the search without scanning all Connections: Query vector calls search without scanning all (step 1) search without scanning all calls 20M vectors — approximate search (step 2)
20M vectorsand growing4s per query
Query vector