Glossary
Incremental indexing
Updating a search or RAG index by processing only the documents that were added, changed or deleted since the last run, instead of rebuilding the whole index.
Incremental indexing is updating a search index with only what has changed since the last run: new documents are added, edited documents are re-processed and replaced, and deleted documents are removed. Everything else stays as it is. For a RAG pipeline, it is the difference between an index that tracks its sources daily and one that is rebuilt occasionally and drifts into stale knowledge in between.
How incremental indexing works
Every incremental scheme has three parts: detecting changes, applying them, and keeping the index consistent while it happens.
Change detection compares the current state of each source with what was indexed. The cheapest signal is a modified timestamp. A content hash per document is more reliable, because it catches edits that did not update the timestamp and ignores saves that changed nothing. Some sources push changes instead, through a webhook or a change feed, and the trade-offs between push and pull are covered in webhooks vs polling.
Applying changes means re-running the usual data ingestion steps for the affected documents only: load, chunking, embedding and writing to the index. The important detail is identity. Each chunk should carry a stable document ID, so that when a document changes the pipeline deletes all of its old chunks and writes the new ones. Re-chunking an edited document usually produces a different number of chunks, so updating chunks one by one leaves orphans behind. Writes should also be idempotent, so that a retried job does not create a second copy, which would then need deduplication.
Change at the source | What the index needs | Re-embedding needed |
|---|---|---|
New document | Chunk, embed and insert | Yes, for that document |
Edited document | Delete all its chunks, then re-chunk and insert | Yes, for that document |
Deleted document | Delete all its chunks | No |
Metadata change only, such as a tag or folder | Update metadata on its chunks | No |
New embedding model | Rebuild every vector | Yes, for everything |
The last row is where incremental indexing stops. Vectors from two embedding models do not belong in one index, so a model change needs a full re-indexing, and skipping it leads to embedding drift.
Index structures and updates
Most search structures accept incremental writes. An inverted index for keyword search adds new postings and marks deleted ones. Graph indexes such as HNSW insert new vectors cheaply, while deletions are often handled by marking nodes as deleted and cleaning up later, so heavy churn can slowly reduce recall until the vector index is compacted or rebuilt. Many teams combine daily incremental runs with an occasional full rebuild for that reason.
Where it goes wrong
Missed deletes are the most common failure: the pipeline handles new and changed files but never learns that a source was removed, so retired content keeps appearing in answers. Partial failures are next. If the delete of old chunks succeeds and the insert of new ones fails, the document disappears from search until the next run, so the job needs retry logic and, ideally, a job queue that records what is pending. A third issue is drift between sources and index that nobody measures, which is why document freshness is worth tracking as a number.
Frameworks such as LangChain and LlamaIndex include helpers that record document hashes to skip unchanged content; the scheduling, deletes and failure handling are still yours to run. Exabase vs LangChain compares that framework approach with a managed one.
Incremental indexing on Exabase
On Exabase, indexing happens per resource at write time. Each file, note or bookmark stored as a Resource is extracted and indexed when it is created, so adding content is incremental by default and becomes searchable through Deep Search without a batch job. Deleting a resource moves it to the bin, and it is permanently deleted after 30 days. The creating resources guide covers the upload flow, and the post on indexing without an embedding pipeline explains the design.
For sources outside Exabase that change, a Worker on a schedule can re-extract documents that have changed and tidy what has aged out, which is the work behind the knowledge base solution. For one-off processing, Extract jobs can notify your server on completion, described in the extraction webhooks guide. Deciding which external sources to watch, and how often, stays with you.
FAQs
What is incremental indexing?
Incremental indexing is updating an index with only the documents that were added, changed or deleted since the last update, instead of rebuilding the whole index each time.
How does incremental indexing detect changes?
Usually by comparing modified timestamps or content hashes with what was indexed last time, or by receiving change notifications from the source through webhooks or a change feed.
How do I handle deleted documents?
Track every indexed document by a stable ID and compare the list with the source on each run. Anything missing from the source gets all of its chunks removed from the index.
When do I need a full re-index instead?
When the embedding model, chunking strategy or index schema changes. Those changes affect every document, so incremental updates would leave the index mixing two formats.
Does incremental indexing reduce cost?
Yes. Embedding and extraction costs scale with the amount of content processed, so re-processing only changed documents is far cheaper than re-processing everything.
Does Exabase support incremental indexing?
Resources are indexed individually when they are stored, so new content becomes searchable without a rebuild. A scheduled Worker can re-extract documents that change at their source.
Related pages: Re-indexing, Stale knowledge, Document freshness, Embedding drift, Knowledge base maintenance, Data ingestion, File indexing, Knowledge base, Knowledge bases use case, Best RAG infrastructure.