What is incremental indexing?
Incremental indexing reflects content added to, changed in or deleted from a document collection in the search index by processing only what changed rather than rebuilding the whole index; it is used for both keyword and vector indexes.
Unlike document ingestion, which runs from reading a document through parsing and chunking to writing it to the index, incremental indexing is the part that keeps changes flowing into the index continuously and efficiently.
- Topic
- Embeddings, document processing and RAG
- Also known as
- Dynamic indexing, incremental index update
How incremental indexing works
- Changed documents in source systems are detected through timestamps, version data or a change feed.
- New or changed documents are parsed, chunked and embedded if needed, then added to the index.
- Old records of deleted or changed documents are removed or marked invalid.
- The index is periodically merged or compacted to clear accumulated small segments and deleted records.
In more detail
Deletes, updates and recall loss in vector and inverted indexes
Unlike inverted keyword indexes that merge immutable posting segments (as in LSM-trees or Lucene), graph-based vector indexes such as HNSW cannot remove nodes in place without breaking graph connectivity and degrading search recall. Vector engines therefore rely on tombstone bitmasks for soft deletes and trigger background segment compaction or periodic graph rebuilds once deleted entries exceed a threshold.
Document-level atomicity, content hashes and orphan chunks
When a 20-page document is edited down to 12 pages, naive upsert overwrites only the first 12 pages' chunks and leaves 8 orphaned stale chunks behind. Production pipelines avoid this by assigning deterministic document-plus-chunk IDs, tracking content hashes and executing atomic delete-by-document-ID plus upsert (or versioned alias swaps) inside an idempotent pipeline.
Separating metadata and permission updates from re-embedding
Not every change requires GPU-heavy re-embedding: if only a document's access permissions (ACLs), tags or status change while its text stays identical, metadata-only incremental updates should patch payload fields directly in the vector or search store without re-running chunking or embedding models.
Keeping hybrid indexes in sync
Modern enterprise RAG often maintains hybrid indexes, dense vectors, sparse/BM25 lexical indexes and sometimes knowledge graphs, in parallel. Incremental indexing must keep all representations transactionally aligned via an outbox or CDC event log so a newly deleted or updated document does not remain searchable in one index while removed from another.
Commonly confused terms
| Term | How it differs |
|---|---|
| Full reindexing | Full reindexing rebuilds the entire search index from scratch (required when changing embedding models or chunking schemes), whereas incremental indexing patches only modified records against a stable schema and model. |
| Change data capture (CDC) | Change Data Capture (CDC) is the upstream database/storage mechanism that emits an event stream of row or document changes; incremental indexing is the downstream search-layer consumer that applies those events to keyword or vector indexes. |
Why incremental indexing matters for on-premises AI
An in-house assistant's answers are only as current as its index. Incremental indexing avoids the cost of full reindexing on every change in large collections and makes new documents searchable within minutes. Fast deletion also matters: a document deleted at source or with changed permissions can keep surfacing in answers if it stays indexed. When the embedding model changes, incremental indexing is not enough; old and new vectors cannot be compared, so the whole collection is re-embedded.
A telecom operator connects its in-house knowledge assistant to the change feed of its document management system; an updated tariff document is reindexed within minutes and old chunks deleted, so the assistant stops showing the old tariff.
Common questions
When is incremental indexing not enough?
When the embedding model or chunking method changes. Old records no longer match new ones, so the collection is indexed from scratch.
How are deleted documents removed from the index?
The deletion at source is detected and all of the document's chunks are removed or marked invalid. If skipped, deleted content can keep appearing in answers.
Related terms
Sources
- Manning, Raghavan and Schütze, Introduction to Information Retrieval, Cambridge University Press, 2008
- Malkov and Yashunin, Efficient and robust approximate nearest neighbor search using Hierarchical Navigable Small World graphs, 2016
In the glossary: Glossary, E to L