searchlite

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FacetsInfo

type FacetsInfo = search.FacetsInfo

FacetsInfo describes the executed faceted query.

type FacetsResult

type FacetsResult = search.FacetsResult

FacetsResult is one faceted-search response.

type Plan

type Plan = plannersqlite.Plan

Plan aliases the SQLite planner's plan (keeps signatures tidy).

type Service

type Service struct {
	DB *sql.DB

	// Defaults (PD-1 and SPEC-03 §3); a Query's explicit values win.
	DefaultMode    planner.Mode
	DefaultLimit   int
	DefaultTimeout time.Duration
}

Service executes GQL searches against the personal search_index view.

func New

func New(db *sql.DB) *Service

New returns a Service over the personal database with the standard defaults.

func (*Service) Explain

func (s *Service) Explain(gql string) (string, error)

Explain compiles the query and renders the SQLite plan (the API's /explain route).

func (*Service) Facets

func (s *Service) Facets(ctx context.Context, q search.FacetsQuery) (*FacetsResult, error)

Facets computes the requested facet dimensions over the same filtered row set the search would return.

func (*Service) Search

func (s *Service) Search(ctx context.Context, q search.Query) (*search.Result, error)

Search validates, plans, executes, and shapes one query.

func (*Service) Stats

func (s *Service) Stats(ctx context.Context) (*search.IndexMeta, error)

Stats snapshots the index counts (the same IndexMeta contract).

func (*Service) Validate

func (s *Service) Validate(gql string) error

Validate parses and validates one GQL expression (the API's /validate route; execution is NOT attempted).

Jump to

Keyboard shortcuts

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