search

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package search ranks tools for code mode's searchTools() and the tool_search tool with BM25.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RankDocuments

func RankDocuments(query string, documents []Document, limit int) []string

RankDocuments is Okapi BM25 (k1 1.2, b 0.75): the names of the best matches, best first; ties keep document order.

Types

type Document

type Document struct{ Name, Text string }

Document is a tool as the ranker sees it: its name and its text.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL