From 48ff9a82186ee3a28808f9f00e7c4f7552f51659 Mon Sep 17 00:00:00 2001 From: stumpylog <797416+stumpylog@users.noreply.github.com> Date: Thu, 20 Aug 2026 09:44:10 -0700 Subject: [PATCH] docs(search): point the field-table comments at field_descriptors() Both comments still described the pre-fingerprint layout: _fields.py said the internal-only fields "stay hardcoded in build_schema()", and the fast-flag test said build_schema() honors the flag only in its U64 and DATE branches. Both now live in field_descriptors(), and _fields.py's header is the one thing a future editor reads before touching the field table, so a stale pointer there is the expensive kind. Comments only; no executable line is touched. Co-Authored-By: Claude Opus 5 --- src/documents/search/_fields.py | 4 ++-- src/documents/tests/search/test_schema.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/documents/search/_fields.py b/src/documents/search/_fields.py index 709f198e6..002a4836d 100644 --- a/src/documents/search/_fields.py +++ b/src/documents/search/_fields.py @@ -6,8 +6,8 @@ from whoosh_compat import SubpathSpec # Internal-only schema fields with no query-syntax meaning of their own # (sort shadow fields, bigram CJK fields, simple_title/simple_content, -# autocomplete_word, notes_text) are NOT represented here — they stay -# hardcoded in _schema.py's build_schema(). +# autocomplete_word, notes_text) are NOT represented here — they are +# declared in _schema.py's field_descriptors(). # # analyzer/pattern_normalizer are deliberately left at FieldSpec's default # (None): they're language-specific and only meaningful to whoosh-compat's diff --git a/src/documents/tests/search/test_schema.py b/src/documents/tests/search/test_schema.py index 739f98171..7ab259a73 100644 --- a/src/documents/tests/search/test_schema.py +++ b/src/documents/tests/search/test_schema.py @@ -140,8 +140,8 @@ class TestFastFlagAgreement: # whoosh-compat's registry trusts PUBLIC_FIELDS' fast flag when resolving # field:* existence checks (its FAST_FIELD strategy); a fast=True # entry whose actual tantivy column is not fast would make those - # searches silently match nothing at search time. build_schema() - # only honors the flag in its U64 and DATE branches today, so this + # searches silently match nothing at search time. Only the U64 and + # DATE descriptors can carry the flag today, so this # pins the agreement for EVERY kind: a future fast=True # TEXT/KEYWORD/JSON entry the builder silently ignores fails here # instead of at a user's query.