collector

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const CheckDoneEvery = 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 AllCollector

type AllCollector struct {
}

func NewAllCollector

func NewAllCollector() *AllCollector

func (*AllCollector) BackingSize

func (a *AllCollector) BackingSize() int

func (*AllCollector) Collect

func (*AllCollector) Size

func (a *AllCollector) Size() int

type AllIterator

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

func (*AllIterator) Aggregations

func (a *AllIterator) Aggregations() *search.Bucket

func (*AllIterator) Next

func (a *AllIterator) Next() (next *search.DocumentMatch, err error)

type TopNCollector

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

TopNCollector collects the top N hits, optionally skipping some results

func NewTopNCollector

func NewTopNCollector(size, 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 NewTopNCollectorAfter

func NewTopNCollectorAfter(size int, sort search.SortOrder, after [][]byte, reverse bool) *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) BackingSize

func (hc *TopNCollector) BackingSize() int

func (*TopNCollector) Collect

Collect goes to the index to find the matching documents

func (*TopNCollector) Size

func (hc *TopNCollector) Size() int

type TopNIterator

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

func (*TopNIterator) Aggregations

func (i *TopNIterator) Aggregations() *search.Bucket

func (*TopNIterator) Next

func (i *TopNIterator) Next() (*search.DocumentMatch, error)

Jump to

Keyboard shortcuts

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