search

package
v0.0.0-...-140ca5a Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DocType

type DocType int

DocType distinguishes SaaS docs from versioned self-hosted docs.

const (
	DocTypeUnspecified DocType = iota
	DocTypeSaaS
	DocTypeVersioned
)

type Result

type Result struct {
	Path        string
	Title       string
	Snippet     string
	Score       float64
	Version     string
	DocType     string
	Anchor      string
	Description string
}

Result represents a search result.

type SearchRequest

type SearchRequest struct {
	Query      string
	Version    string  // optional version filter (e.g. "saas", "CE", "EE")
	DocType    DocType // optional filter
	Limit      int32   // default from config
	Offset     int32
	PathPrefix string // optional filter to a subtree
}

SearchRequest represents a search query with optional filters.

type Searcher

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

Searcher provides full-text search over the docs index.

func Open

func Open(indexPath string) (*Searcher, error)

Open opens an existing Bleve index at the given path in read-only mode. Read-only mode is required for deployments where the index is baked into a read-only container filesystem (e.g., Kubernetes).

func (*Searcher) Close

func (s *Searcher) Close() error

Close closes the index.

func (*Searcher) Search

func (s *Searcher) Search(req *SearchRequest) ([]Result, error)

Search executes a search query with optional filters.

Jump to

Keyboard shortcuts

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