Fix: Don't store autocomplete_word, only index it (#12867)

This commit is contained in:
Trenton H
2026-05-29 14:09:04 -07:00
committed by GitHub
parent 98a7ed32e3
commit bbceb5dac6
2 changed files with 19 additions and 14 deletions
+4 -2
View File
@@ -81,8 +81,10 @@ def build_schema() -> tantivy.Schema:
tokenizer_name="simple_search_analyzer",
)
# Autocomplete prefix scan - stored, not indexed
sb.add_text_field("autocomplete_word", stored=True, tokenizer_name="raw")
# Autocomplete prefix scan via terms_with_prefix, which walks the field's
# term dictionary - so the field must be indexed (term dict), not stored.
# The stored value is never read back, so storing it only wastes space.
sb.add_text_field("autocomplete_word", stored=False, tokenizer_name="raw")
sb.add_text_field("tag", stored=True, tokenizer_name="paperless_text")