Help us shape the future of Go! Take the 2026 Go Developer Survey

documentsearch

package
v0.0.0-...-d2b5e08 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: AGPL-3.0 Imports: 28 Imported by: 0

Documentation

Overview

Package documentsearch finds documents containing wanted terms, orders them by relevance, and reports how many documents matched each term.

Index

Constants

View Source
const (
	MaximumQueryMatchEvidencePositions = 256
)

Variables

This section is empty.

Functions

func MountSearch

func MountSearch(
	router httpguard.WireRouter,
	identity nodeidentity.Identity,
	config SearchConfig,
)

func NewLocalSearcher

func NewLocalSearcher(
	index rwi.PostingIndex,
	urls urlmeta.URLDirectory,
	matchesPerTerm int,
) searchcore.Searcher

func NewLocalSearcherWithDocuments

func NewLocalSearcherWithDocuments(
	index rwi.PostingIndex,
	urls urlmeta.URLDirectory,
	documents documentstore.DocumentDirectory,
	matchesPerTerm int,
) searchcore.Searcher

func ProtocolQueryFieldPositions

func ProtocolQueryFieldPositions(
	fields map[string]map[int][]int,
) []yagoproto.QueryFieldPositions

Types

type PotentialPeerObserver

type PotentialPeerObserver interface {
	ObservePotential(ctx context.Context, potential yagomodel.Seed)
}

type QueryMatchEvidenceAnalyzer

type QueryMatchEvidenceAnalyzer interface {
	AnalyzeQueryMatchEvidence(
		ctx context.Context,
		document documentstore.Document,
		requirements []string,
		byteLimit int,
	) (yagoproto.QueryMatchEvidence, int, bool, error)
}

type SearchConfig

type SearchConfig struct {
	Index          rwi.PostingIndex
	Documents      urlmeta.URLDirectory
	DocumentStore  documentstore.DocumentDirectory
	AnalyzerSearch searchcore.Searcher
	Evidence       QueryMatchEvidenceAnalyzer
	MatchesPerTerm int
	Gate           *httpguard.IntakeGate
	PotentialPeers PotentialPeerObserver
}

SearchConfig carries the backing stores and limits for the inbound YaCy remote-search endpoint.

Jump to

Keyboard shortcuts

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