From 1e33c28c246862f0df7b48c9b33f1cf3dd3b8b17 Mon Sep 17 00:00:00 2001 From: CREDO23 Date: Thu, 18 Jun 2026 20:06:26 +0200 Subject: [PATCH] feat: carry char spans on existing chunks --- surfsense_backend/app/indexing_pipeline/chunk_reconciler.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/surfsense_backend/app/indexing_pipeline/chunk_reconciler.py b/surfsense_backend/app/indexing_pipeline/chunk_reconciler.py index 9354aeb9f..dd57a44d1 100644 --- a/surfsense_backend/app/indexing_pipeline/chunk_reconciler.py +++ b/surfsense_backend/app/indexing_pipeline/chunk_reconciler.py @@ -19,6 +19,9 @@ class ExistingChunk: id: int content: str position: int + # Stored char span; None for legacy rows indexed before spans existed. + start_char: int | None = None + end_char: int | None = None @dataclass(frozen=True, slots=True)