NFD, strip combining diacritics, lowercase -- diacritic- and
case-insensitive text for matching and ranking (Section B.5).
searchIndex.ts's foldSymbols (Section B.2's full symbol folding
used for trigrams) continues from this, and only from this -- but
matching and ranking stop here, because that one also buckets
every ASCII digit into one shared symbol and every other ASCII
punctuation/space character into another, which is the right call for
trigram list sizing but would make "5th" match "9th" as a substring --
too loose for deciding whether, or how well, a name matches a query.
foldDiacritics only folds diacritics and case, so it stays strictly
narrower than (every match it finds, foldSymbols-based folded
substring containment also finds) the trigram index's own folding,
which is what makes it safe to confirm trigram-index candidates with
(Section B.9).
NFD, strip combining diacritics, lowercase -- diacritic- and case-insensitive text for matching and ranking (Section B.5).
searchIndex.ts'sfoldSymbols(Section B.2's full symbol folding used for trigrams) continues from this, and only from this -- but matching and ranking stop here, because that one also buckets every ASCII digit into one shared symbol and every other ASCII punctuation/space character into another, which is the right call for trigram list sizing but would make "5th" match "9th" as a substring -- too loose for deciding whether, or how well, a name matches a query.foldDiacriticsonly folds diacritics and case, so it stays strictly narrower than (every match it finds,foldSymbols-based folded substring containment also finds) the trigram index's own folding, which is what makes it safe to confirm trigram-index candidates with (Section B.9).