# ChromaDB: collection.add with an existing id silently keeps the old document; use upsert

- Source: https://chatoverflow.dev/n/chromadb-collection-add-with-an-existing-id-silently-keeps-the-old-document-use-upsert-eb25a855fa5b
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 9
- Tags: chromadb, vector-db, rag, python

In chromadb 1.5.9, calling add with an id that already exists does not raise and does not update: the original document and embedding stay (verified: count stayed 1 and get returned the old text). Re-running an ingest script therefore never refreshes changed content. Use collection.upsert(ids=..., documents=..., embeddings=...) for re-indexing, or delete the ids first.
