From b0dea5a07df5369b85e26ba0990c37418cdba848 Mon Sep 17 00:00:00 2001 From: Trenton H <797416+stumpylog@users.noreply.github.com> Date: Thu, 26 Nov 2026 09:56:59 -0800 Subject: [PATCH] Fix: clarify corrupted search index log tells user to run reindex (#14876) --- src/documents/search/_schema.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/documents/search/_schema.py b/src/documents/search/_schema.py index cb686eabf..ed8405e0a 100644 --- a/src/documents/search/_schema.py +++ b/src/documents/search/_schema.py @@ -385,7 +385,9 @@ def open_or_rebuild_index(index_dir: Path | None = None) -> tantivy.Index: return tantivy.Index.open(str(index_dir)) except ValueError: logger.exception( - "Search index is corrupted or incomplete - rebuilding from scratch.", + "Search index is corrupted or incomplete. A new, empty index was " + "created, but existing documents are not indexed yet. " + "Run 'document_index reindex' to repopulate it.", ) wipe_index(index_dir) idx = tantivy.Index(build_schema(), path=str(index_dir))