hybrid

package
v1.17.2 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2023 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultLimit = 100

Variables

This section is empty.

Functions

func FusionScoreCombSUM

func FusionScoreCombSUM(results [][]search.Result) []search.Result

func FusionScoreConcatenate

func FusionScoreConcatenate(results [][]*search.Result) []*search.Result

Types

type Params

type Params struct {
	*searchparams.HybridSearch
	Keyword *searchparams.KeywordRanking
	Class   string
}

type Result

type Result struct {
	DocID uint64
	*search.Result
}

Result facilitates the pairing of a search result with its internal doc id.

This type is key in generalising hybrid search across different use cases. Some use cases require a full search result (Get{} queries) and others need only a doc id (Aggregate{}) which the search.Result type does not contain.

func FusionReciprocal

func FusionReciprocal(weights []float64, results [][]*Result) []*Result

type Results

type Results []*Result

func (Results) SearchResults

func (res Results) SearchResults() []search.Result

type Searcher

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

func NewSearcher

func NewSearcher(params *Params, logger logrus.FieldLogger,
	sparse sparseSearchFunc, dense denseSearchFunc,
	postProc postProcFunc, modulesProvider modulesProvider,
) *Searcher

func (*Searcher) Search

func (s *Searcher) Search(ctx context.Context) (Results, error)

Search executes sparse and dense searches and combines the result sets using Reciprocal Rank Fusion

Jump to

Keyboard shortcuts

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