search

package
v1.0.0-alpha.47 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	This  = 1
	That  = -1
	Equal = 0
)

Comparison outputs

Variables

This section is empty.

Functions

This section is empty.

Types

type Hit

type Hit struct {
	Document       map[string]interface{}
	TextMatchScore int64
}

func NewSearchHit

func NewSearchHit(tsHit *tsApi.SearchResultHit) *Hit

type SortedHits

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

SortedHits is a Priority queue to hold sorted search hits

func NewSortedHits

func NewSortedHits(sortingOrder *sort.Ordering) SortedHits

NewSortedHits returns hits in decreasing order by priority

func (*SortedHits) Add

func (s *SortedHits) Add(hit *Hit) error

func (*SortedHits) Get

func (s *SortedHits) Get() (*Hit, error)

func (*SortedHits) HasMoreHits

func (s *SortedHits) HasMoreHits() bool

func (*SortedHits) Len

func (s *SortedHits) Len() int

Jump to

Keyboard shortcuts

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