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 (a *AllCollector) Collect(ctx context.Context, aggs search.Aggregations, searcher search.Collectible) (search.DocumentMatchIterator, error)
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 ¶
func (hc *TopNCollector) Collect(ctx context.Context, aggs search.Aggregations, searcher search.Collectible) (search.DocumentMatchIterator, error)
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)
Click to show internal directories.
Click to hide internal directories.