Incremental semantic index ingestion. #2055
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR documents our Elasticsearch integration architecture, which implements an incremental indexing strategy for maintaining both lexical (traditional full-text) and semantic (vector embeddings) search indices.
The Problem We're Solving
Every time we rebuild our documentation, we need to:
The Solution: Hash-Based Change Detection + Incremental Sync
During Indexing (Lexical Index):
batch_index_date
last_updated
timestampThe hash checking happens on the server (elasticsearch) through the reindex API.
Synchronize from lexical to semantic index
The StopAsync method orchestrates a 5-phase synchronization:
last_updated >= batch_date
from lexical → semanticlexical
tosemantic
where:batch_index_date < batch_date
and make those operations a delete.batch_index_date < batch_date
from lexical index itself.Why This Matters
last_updated
to boost recency (if needed).Visualization
New docs includes a step-by-step visual walkthrough showing how documents flow through the system, with color-coded states (blue = batch-tracked, green = updated, red = marked for deletion).
For Reviewers