Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fuzzy ¶
Fuzzy reports whether every rune in query appears in text in order (but not necessarily contiguously). It returns the matched rune indexes, or nil if the query does not match. Case sensitivity is controlled by c using the same semantics as Term.Match: SmartCase is case-insensitive unless query contains uppercase.
When multiple match positions exist, Fuzzy prefers the tightest (shortest-span) match using a three-pass algorithm:
- Forward pass to confirm a match exists.
- Backward pass to find the tightest window.
- Forward pass over that window to collect exact indexes.
Types ¶
type Term ¶
type Term struct {
Text string
Prefix bool // ^ anchor
Suffix bool // $ anchor
Negate bool // ! invert
Case Case
}
Term represents a parsed search term with optional modifiers.
Click to show internal directories.
Click to hide internal directories.