Documentation
¶
Overview ¶
Package search implements the searching in a given database.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
Database manages the updates needed to drive the text index.
func NewDatabase ¶
NewDatabase creates a new database,
type QueryServer ¶
type QueryServer struct {
// contains filtered or unexported fields
}
QueryServer manages incoming queries against the database.
func NewQueryServer ¶
func NewQueryServer(cfg *config.Config, ti *TextIndex) (*QueryServer, error)
NewQueryServer creates a new query server with the help of a text index.
func (*QueryServer) Query ¶
func (qs *QueryServer) Query(q string, collections []string, meeting int) (answers map[string]Answer, err error)
Query searches the database for hits. Returns a list of fqids.
func (*QueryServer) Run ¶
func (qs *QueryServer) Run(ctx context.Context)
Run starts the query server.
type TextIndex ¶
type TextIndex struct {
// contains filtered or unexported fields
}
TextIndex manages a text index over a given database.
func NewTextIndex ¶
func NewTextIndex( cfg *config.Config, db *Database, collections meta.Collections, ) (*TextIndex, error)
NewTextIndex creates a new text index.
Click to show internal directories.
Click to hide internal directories.