Database / Milvus Vector database Interview questions
How does Milvus handle search on data that hasn't been indexed yet?
Rather than making freshly inserted data invisible to search until its sealed segment's full index finishes building, a process that can take real time for a large segment, Milvus makes growing-segment data searchable immediately, using either a lightweight, quickly-built temporary index or a straightforward brute-force scan over the (still relatively small) in-memory growing segment.
Once a segment seals and its proper index (HNSW, IVF, or whichever type the collection is configured to use) finishes building on an Index Node, Query Nodes transparently switch to using that optimized index for that segment going forward, without any client-visible change in behavior beyond, typically, faster search against that now-larger, now-indexed chunk of data.
This design directly serves real-time use cases, like a chat application where a newly sent message needs to be searchable within milliseconds, that would be broken if there were any meaningful delay between an insert completing and that data becoming visible to search.
More Related questions...