package
Version:
v0.1.0
Opens a new window with list of versions in this module.
Published: Nov 1, 2026
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package search provides ranked search results over the index.
type Hit struct {
Sources []string `json:"sources,omitempty"`
ID string `json:"id" jsonschema:"id"`
Title string `json:"title" jsonschema:"title"`
Score float64 `json:"score" jsonschema:"score"`
Snippet string `json:"snippet" jsonschema:"snippet"`
}
func Fuse(keyword, semantic []Hit, limit int) []Hit
Fuse uses one-based ranks and sorts before rounding to preserve close scores.
Keyword returns BM25 results, with lower scores ranking first.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.