Documentation
¶
Overview ¶
Package fuzzy scores candidate strings against a subsequence query and ranks them, backing the file and revision pickers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Score ¶
Score calculates fuzzy match score for a query against text Higher score is better. Returns 0 if no match.
Algorithm: - Consecutive character matches get bonus points - Case-sensitive matches get bonus points - Matches at word boundaries get bonus points - Earlier matches get higher scores.
Types ¶
type Match ¶
Match is one scored candidate. Indices holds the ascending byte offsets in Text that the query matched, and Original carries whatever value the caller paired with the candidate. Matched is false on the unranked passthrough Filter returns for an empty query.