← Vector Databases & Retrieval
Upsert
An upsert operation inserts a vector into the index if its ID does not already exist or replaces the existing vector if it does. Upsert semantics are essential in dynamic corpora where source documents are frequently revised: rather than deleting and re-inserting, the application can send a single upsert call that keeps the index consistent. Most vector databases expose upsert as their primary write operation, and HNSW indexes support upsert without full rebuilds.