search

package
v1.9.5 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package search implements site search.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DocumentResult

type DocumentResult struct {
	index.DocumentResult
	SectionResults []SectionResult
}

DocumentResult is the result of a search for a single document

type Result

type Result struct {
	DocumentResults []DocumentResult // document results
	Total           int              // total number of document results
}

Result is the result of a search.

func Search(query query.Query, index *index.Index) (*Result, error)

type SectionResult

type SectionResult struct {
	ID         string   // the URL fragment (without "#") of the section, or empty if in the first section
	IDStack    []string // the stack of section IDs
	Title      string   // the section title
	TitleStack []string // the stack of section titles
	Excerpts   []string // the match excerpt
}

Directories

Path Synopsis
Package index implements a search index.
Package index implements a search index.
Package query implements search query parsing and matching.
Package query implements search query parsing and matching.

Jump to

Keyboard shortcuts

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