Documentation
¶
Overview ¶
Package query builds the Bleve search request from user input (positional terms + repeatable --field filters) and renders results.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Hit ¶
type Hit struct {
Path string `json:"path"`
Score float64 `json:"score"`
Title string `json:"title,omitempty"`
Tags []string `json:"tags,omitempty"`
Snippet string `json:"snippet,omitempty"`
Extras map[string]any `json:"extras,omitempty"`
Frags map[string][]string `json:"fragments,omitempty"`
}
Hit is one ranked search result.
type Request ¶
type Request struct {
Terms string // positional query string; empty -> match all
Fields map[string]string // exact-match filters AND'd with the query
Limit int // 0 -> 10
NoSnippet bool // disable highlight extraction
Boosts map[string]float64 // field -> boost (only applied when > 0)
Highlight string // "ansi", "html", or "" (empty disables)
}
Request describes a single search.
Click to show internal directories.
Click to hide internal directories.