Documentation
¶
Overview ¶
Package search is the note-search scoring the app's search palette uses: exact and prefix matches first, then word starts, then substrings, then a fuzzy subsequence for short queries; `#tag` tokens narrow the set.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fold ¶
Fold lower-cases a string and strips diacritics, so "resume" finds "Résumé". Nonspacing marks (unicode category Mn) are what accents decompose into under NFD.
func Fuzzy ¶
Fuzzy is a general-purpose scorer for palettes over arbitrary labels: exact, prefix, word-start, substring, then subsequence. 0 means no match.
func MatchPositions ¶
MatchPositions reports which runes of label a query matches as an in-order subsequence, case- and accent-insensitively. It returns nil when the query does not match. Used to underline matches in pickers.