Normalizing Search Terms
A search index can use canonical term representations while preserving the original text for readers.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 4
- Reading time
- 1 min
In this article4 chapters
Trace mixed case
Indexing “Python” and querying “python” can produce one key if both use case normalization. The article can still display Python. Canonical label rules illustrate the two representations.
Check language-sensitive cases
Normalization and segmentation should match the content's supported languages. Test both lookup behavior and preserved display text. Unicode normalization describes one part of that process.[1]
Run the same query and document term through the same policy
Suppose an index stores uppercase MAPS as folded token maps. A query for Maps should produce maps under the compatible rule. Keeping original text available lets the result display the author's spelling even when lookup tokens differ. See normalization and equality.
Document term MAPS → maps
Query term Maps → maps
Display title still uses original spelling
Decide whether broader equivalence is desired
Accent folding, stemming and case comparison can merge terms with different meanings. Test a case-only pair and a deliberately distinct pair. Rebuild or version the index if the token policy changes.