collectors

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const CheckDoneEvery = uint64(1024)

CheckDoneEvery controls how frequently we check the context deadline

Variables

View Source
var PreAllocSizeSkipCap = 1000

PreAllocSizeSkipCap will cap preallocation to this amount when size+skip exceeds this value

Functions

This section is empty.

Types

type TopNCollector added in v0.4.0

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

TopNCollector collects the top N hits, optionally skipping some results

func NewTopNCollector added in v0.4.0

func NewTopNCollector(size int, skip int, sort search.SortOrder) *TopNCollector

NewTopNCollector builds a collector to find the top 'size' hits skipping over the first 'skip' hits ordering hits by the provided sort order

func (*TopNCollector) Collect added in v0.4.0

func (hc *TopNCollector) Collect(ctx context.Context, searcher search.Searcher, reader index.IndexReader) error

Collect goes to the index to find the matching documents

func (*TopNCollector) FacetResults added in v0.4.0

func (hc *TopNCollector) FacetResults() search.FacetResults

FacetResults returns the computed facets results

func (*TopNCollector) MaxScore added in v0.4.0

func (hc *TopNCollector) MaxScore() float64

MaxScore returns the maximum score seen across all the hits

func (*TopNCollector) Results added in v0.4.0

Results returns the collected hits

func (*TopNCollector) SetFacetsBuilder added in v0.4.0

func (hc *TopNCollector) SetFacetsBuilder(facetsBuilder *search.FacetsBuilder)

SetFacetsBuilder registers a facet builder for this collector

func (*TopNCollector) Took added in v0.4.0

func (hc *TopNCollector) Took() time.Duration

Took returns the time spent collecting hits

func (*TopNCollector) Total added in v0.4.0

func (hc *TopNCollector) Total() uint64

Total returns the total number of hits

Jump to

Keyboard shortcuts

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