search

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Query

type Query struct {
	Text     string    // Free-text search terms
	Project  string    // project: filter
	Model    string    // model: filter
	Tool     string    // tool: filter
	File     string    // file: filter
	Before   time.Time // before: filter
	After    time.Time // after: filter
	HasError bool      // has:error filter
	HasAgent bool      // has:subagent filter
}

Query represents a parsed search query

func Parse

func Parse(input string) *Query

Parse parses a search query string into a Query struct

func (*Query) HasFilters

func (q *Query) HasFilters() bool

HasFilters returns true if the query has any non-text filters

func (*Query) IsEmpty

func (q *Query) IsEmpty() bool

IsEmpty returns true if the query has no filters

type Result

type Result struct {
	Turn        models.Turn `json:"turn"`
	SessionID   string      `json:"session_id"`
	ProjectPath string      `json:"project_path"`
	Model       string      `json:"model,omitempty"`
	Snippet     string      `json:"snippet"`
}

Result represents a search result

type Searcher

type Searcher struct {
	// contains filtered or unexported fields
}

Searcher executes search queries

func New

func New(db *sql.DB) *Searcher

New creates a new Searcher

func (*Searcher) Search

func (s *Searcher) Search(q *Query, limit int) ([]Result, error)

Search executes a search query and returns results

Jump to

Keyboard shortcuts

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