pub fn search_official(
query: &str,
fuzzy: bool,
) -> Vec<(PackageItem, Option<i64>)>Expand description
What: Search the official index for packages whose names match query.
Inputs:
query: Raw query stringfuzzy: Whentrue, uses fuzzy matching (fzf-style); whenfalse, uses substring matching
Output:
- Vector of
PackageItems populated from the index; enrichment is not performed here. An empty or whitespace-only query returns an empty list. When fuzzy mode is enabled, items are returned with scores for sorting.
Details:
- When
fuzzyisfalse, performs a case-insensitive substring match on package names. - When
fuzzyistrue, uses fuzzy matching and returns items with match scores.