mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-08-26 04:33:20 +00:00
get_field_registry() branched the analyzer by field kind but gave every field the same stemming pattern normalizer. checksum is indexed with the raw tokenizer, so its terms are neither folded nor stemmed, yet its wildcard patterns were: "checksum:ceded*" normalized to "cede*" and matched a document whose checksum starts with "cedef00d". About 2.8% of random hex prefixes were rewritten this way. Always over-matching rather than missing, but for a field whose whole purpose is exact identification, returning a different checksum is a wrong answer. KEYWORD fields now get a fold-and-lower normalizer, which is what every field used before pattern stemming was added; TEXT fields keep the stemming one so "invoice*" still reaches the indexed "invoic". Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>