Documentation ¶
Index ¶
- Variables
- func ComputeGeoRange(term uint64, shift uint, sminLon, sminLat, smaxLon, smaxLat float64, ...) (onBoundary, notOnBoundary [][]byte, err error)
- func NewConjunctionSearcher(indexReader search.Reader, qsearchers []search.Searcher, ...) (search.Searcher, error)
- func NewDisjunctionSearcher(indexReader search.Reader, qsearchers []search.Searcher, min int, ...) (search.Searcher, error)
- func NewFuzzySearcher(indexReader search.Reader, term string, prefix, fuzziness int, field string, ...) (search.Searcher, error)
- func NewGeoBoundedPolygonSearcher(indexReader search.Reader, polygon []geo.Point, field string, boost float64, ...) (search.Searcher, error)
- func NewGeoBoundingBoxSearcher(indexReader search.Reader, minLon, minLat, maxLon, maxLat float64, ...) (search.Searcher, error)
- func NewGeoPointDistanceSearcher(indexReader search.Reader, centerLon, centerLat, dist float64, field string, ...) (search.Searcher, error)
- func NewMultiTermSearcher(indexReader search.Reader, terms []string, field string, boost float64, ...) (search.Searcher, error)
- func NewMultiTermSearcherBytes(indexReader search.Reader, terms [][]byte, field string, boost float64, ...) (search.Searcher, error)
- func NewMultiTermSearcherIndividualBoost(indexReader search.Reader, terms []string, termBoosts []float64, field string, ...) (search.Searcher, error)
- func NewNumericRangeSearcher(indexReader search.Reader, min, max float64, inclusiveMin, inclusiveMax bool, ...) (search.Searcher, error)
- func NewRegexpStringSearcher(indexReader search.Reader, pattern, field string, boost float64, ...) (search.Searcher, error)
- func NewTermPrefixSearcher(indexReader search.Reader, prefix, field string, boost float64, ...) (search.Searcher, error)
- func NewTermRangeSearcher(indexReader search.Reader, min, max []byte, inclusiveMin, inclusiveMax bool, ...) (search.Searcher, error)
- type BooleanSearcher
- func (s *BooleanSearcher) Advance(ctx *search.Context, number uint64) (*search.DocumentMatch, error)
- func (s *BooleanSearcher) Close() error
- func (s *BooleanSearcher) Count() uint64
- func (s *BooleanSearcher) DocumentMatchPoolSize() int
- func (s *BooleanSearcher) Min() int
- func (s *BooleanSearcher) Next(ctx *search.Context) (*search.DocumentMatch, error)
- func (s *BooleanSearcher) Size() int
- type ConjunctionSearcher
- func (s *ConjunctionSearcher) Advance(ctx *search.Context, number uint64) (*search.DocumentMatch, error)
- func (s *ConjunctionSearcher) Close() (rv error)
- func (s *ConjunctionSearcher) Count() uint64
- func (s *ConjunctionSearcher) DocumentMatchPoolSize() int
- func (s *ConjunctionSearcher) Min() int
- func (s *ConjunctionSearcher) Next(ctx *search.Context) (*search.DocumentMatch, error)
- func (s *ConjunctionSearcher) Size() int
- type DisjunctionHeapSearcher
- func (s *DisjunctionHeapSearcher) Advance(ctx *search.Context, number uint64) (*search.DocumentMatch, error)
- func (s *DisjunctionHeapSearcher) Close() (rv error)
- func (s *DisjunctionHeapSearcher) Count() uint64
- func (s *DisjunctionHeapSearcher) DocumentMatchPoolSize() int
- func (s *DisjunctionHeapSearcher) Len() int
- func (s *DisjunctionHeapSearcher) Less(i, j int) bool
- func (s *DisjunctionHeapSearcher) Min() int
- func (s *DisjunctionHeapSearcher) Next(ctx *search.Context) (*search.DocumentMatch, error)
- func (s *DisjunctionHeapSearcher) Optimize(kind string, octx segment.OptimizableContext) (segment.OptimizableContext, error)
- func (s *DisjunctionHeapSearcher) Pop() interface{}
- func (s *DisjunctionHeapSearcher) Push(x interface{})
- func (s *DisjunctionHeapSearcher) Size() int
- func (s *DisjunctionHeapSearcher) Swap(i, j int)
- type DisjunctionSliceSearcher
- func (s *DisjunctionSliceSearcher) Advance(ctx *search.Context, number uint64) (*search.DocumentMatch, error)
- func (s *DisjunctionSliceSearcher) Close() (rv error)
- func (s *DisjunctionSliceSearcher) Count() uint64
- func (s *DisjunctionSliceSearcher) DocumentMatchPoolSize() int
- func (s *DisjunctionSliceSearcher) Min() int
- func (s *DisjunctionSliceSearcher) Next(ctx *search.Context) (*search.DocumentMatch, error)
- func (s *DisjunctionSliceSearcher) Optimize(kind string, octx segment.OptimizableContext) (segment.OptimizableContext, error)
- func (s *DisjunctionSliceSearcher) Size() int
- type FilterFunc
- type FilteringSearcher
- func (f *FilteringSearcher) Advance(ctx *search.Context, number uint64) (*search.DocumentMatch, error)
- func (f *FilteringSearcher) Close() error
- func (f *FilteringSearcher) Count() uint64
- func (f *FilteringSearcher) DocumentMatchPoolSize() int
- func (f *FilteringSearcher) Min() int
- func (f *FilteringSearcher) Next(ctx *search.Context) (*search.DocumentMatch, error)
- func (f *FilteringSearcher) Size() int
- type MatchAllSearcher
- func (s *MatchAllSearcher) Advance(ctx *search.Context, number uint64) (*search.DocumentMatch, error)
- func (s *MatchAllSearcher) Close() error
- func (s *MatchAllSearcher) Count() uint64
- func (s *MatchAllSearcher) DocumentMatchPoolSize() int
- func (s *MatchAllSearcher) Min() int
- func (s *MatchAllSearcher) Next(ctx *search.Context) (*search.DocumentMatch, error)
- func (s *MatchAllSearcher) Size() int
- type MatchNoneSearcher
- func (s *MatchNoneSearcher) Advance(ctx *search.Context, number uint64) (*search.DocumentMatch, error)
- func (s *MatchNoneSearcher) Close() error
- func (s *MatchNoneSearcher) Count() uint64
- func (s *MatchNoneSearcher) DocumentMatchPoolSize() int
- func (s *MatchNoneSearcher) Min() int
- func (s *MatchNoneSearcher) Next(ctx *search.Context) (*search.DocumentMatch, error)
- func (s *MatchNoneSearcher) SetQueryNorm(_ float64)
- func (s *MatchNoneSearcher) Size() int
- func (s *MatchNoneSearcher) Weight() float64
- type OrderedSearcherList
- type PhraseSearcher
- func (s *PhraseSearcher) Advance(ctx *search.Context, number uint64) (*search.DocumentMatch, error)
- func (s *PhraseSearcher) Close() error
- func (s *PhraseSearcher) Count() uint64
- func (s *PhraseSearcher) DocumentMatchPoolSize() int
- func (s *PhraseSearcher) Min() int
- func (s *PhraseSearcher) Next(ctx *search.Context) (*search.DocumentMatch, error)
- func (s *PhraseSearcher) Size() int
- type TermSearcher
- func (s *TermSearcher) Advance(ctx *search.Context, number uint64) (*search.DocumentMatch, error)
- func (s *TermSearcher) Close() error
- func (s *TermSearcher) Count() uint64
- func (s *TermSearcher) DocumentMatchPoolSize() int
- func (s *TermSearcher) Min() int
- func (s *TermSearcher) Next(ctx *search.Context) (*search.DocumentMatch, error)
- func (s *TermSearcher) Optimize(kind string, octx segment.OptimizableContext) (segment.OptimizableContext, error)
- func (s *TermSearcher) Size() int
Constants ¶
This section is empty.
Variables ¶
var DisjunctionHeapTakeover = 10
DisjunctionHeapTakeover is a compile time setting that applications can adjust to control when the DisjunctionSearcher will switch from a simple slice implementation to a heap implementation.
var DisjunctionMaxClauseCount = 0
DisjunctionMaxClauseCount is a compile time setting that applications can adjust to non-zero value to cause the DisjunctionSearcher to return an error instead of exeucting searches when the size exceeds this value.
var GeoBitsShift1 = geo.GeoBits << 1
var GeoBitsShift1Minus1 = GeoBitsShift1 - 1
var MaxFuzziness = 2
Functions ¶
func ComputeGeoRange ¶
func NewConjunctionSearcher ¶
func NewDisjunctionSearcher ¶
func NewFuzzySearcher ¶
func NewMultiTermSearcher ¶
func NewNumericRangeSearcher ¶
func NewRegexpStringSearcher ¶
func NewRegexpStringSearcher(indexReader search.Reader, pattern, field string, boost float64, scorer search.Scorer, compScorer search.CompositeScorer, options search.SearcherOptions) (search.Searcher, error)
NewRegexpStringSearcher is similar to NewRegexpSearcher, but additionally optimizes for index readers that handle regexp's.
func NewTermPrefixSearcher ¶
Types ¶
type BooleanSearcher ¶
type BooleanSearcher struct {
// contains filtered or unexported fields
}
func NewBooleanSearcher ¶
func NewBooleanSearcher(mustSearcher, shouldSearcher, mustNotSearcher search.Searcher, scorer search.CompositeScorer, options search.SearcherOptions) (*BooleanSearcher, error)
func (*BooleanSearcher) Advance ¶
func (s *BooleanSearcher) Advance(ctx *search.Context, number uint64) (*search.DocumentMatch, error)
func (*BooleanSearcher) Close ¶
func (s *BooleanSearcher) Close() error
func (*BooleanSearcher) Count ¶
func (s *BooleanSearcher) Count() uint64
func (*BooleanSearcher) DocumentMatchPoolSize ¶
func (s *BooleanSearcher) DocumentMatchPoolSize() int
func (*BooleanSearcher) Min ¶
func (s *BooleanSearcher) Min() int
func (*BooleanSearcher) Next ¶
func (s *BooleanSearcher) Next(ctx *search.Context) (*search.DocumentMatch, error)
func (*BooleanSearcher) Size ¶
func (s *BooleanSearcher) Size() int
type ConjunctionSearcher ¶
type ConjunctionSearcher struct {
// contains filtered or unexported fields
}
func (*ConjunctionSearcher) Advance ¶
func (s *ConjunctionSearcher) Advance(ctx *search.Context, number uint64) (*search.DocumentMatch, error)
func (*ConjunctionSearcher) Close ¶
func (s *ConjunctionSearcher) Close() (rv error)
func (*ConjunctionSearcher) Count ¶
func (s *ConjunctionSearcher) Count() uint64
func (*ConjunctionSearcher) DocumentMatchPoolSize ¶
func (s *ConjunctionSearcher) DocumentMatchPoolSize() int
func (*ConjunctionSearcher) Min ¶
func (s *ConjunctionSearcher) Min() int
func (*ConjunctionSearcher) Next ¶
func (s *ConjunctionSearcher) Next(ctx *search.Context) (*search.DocumentMatch, error)
func (*ConjunctionSearcher) Size ¶
func (s *ConjunctionSearcher) Size() int
type DisjunctionHeapSearcher ¶
type DisjunctionHeapSearcher struct {
// contains filtered or unexported fields
}
func (*DisjunctionHeapSearcher) Advance ¶
func (s *DisjunctionHeapSearcher) Advance(ctx *search.Context, number uint64) (*search.DocumentMatch, error)
func (*DisjunctionHeapSearcher) Close ¶
func (s *DisjunctionHeapSearcher) Close() (rv error)
func (*DisjunctionHeapSearcher) Count ¶
func (s *DisjunctionHeapSearcher) Count() uint64
func (*DisjunctionHeapSearcher) DocumentMatchPoolSize ¶
func (s *DisjunctionHeapSearcher) DocumentMatchPoolSize() int
func (*DisjunctionHeapSearcher) Len ¶
func (s *DisjunctionHeapSearcher) Len() int
func (*DisjunctionHeapSearcher) Less ¶
func (s *DisjunctionHeapSearcher) Less(i, j int) bool
func (*DisjunctionHeapSearcher) Min ¶
func (s *DisjunctionHeapSearcher) Min() int
func (*DisjunctionHeapSearcher) Next ¶
func (s *DisjunctionHeapSearcher) Next(ctx *search.Context) ( *search.DocumentMatch, error)
func (*DisjunctionHeapSearcher) Optimize ¶
func (s *DisjunctionHeapSearcher) Optimize(kind string, octx segment.OptimizableContext) ( segment.OptimizableContext, error)
a disjunction searcher implements the index.Optimizable interface but only activates on an edge case where the disjunction is a wrapper around a single Optimizable child searcher
func (*DisjunctionHeapSearcher) Pop ¶
func (s *DisjunctionHeapSearcher) Pop() interface{}
func (*DisjunctionHeapSearcher) Push ¶
func (s *DisjunctionHeapSearcher) Push(x interface{})
func (*DisjunctionHeapSearcher) Size ¶
func (s *DisjunctionHeapSearcher) Size() int
func (*DisjunctionHeapSearcher) Swap ¶
func (s *DisjunctionHeapSearcher) Swap(i, j int)
type DisjunctionSliceSearcher ¶
type DisjunctionSliceSearcher struct {
// contains filtered or unexported fields
}
func (*DisjunctionSliceSearcher) Advance ¶
func (s *DisjunctionSliceSearcher) Advance(ctx *search.Context, number uint64) (*search.DocumentMatch, error)
func (*DisjunctionSliceSearcher) Close ¶
func (s *DisjunctionSliceSearcher) Close() (rv error)
func (*DisjunctionSliceSearcher) Count ¶
func (s *DisjunctionSliceSearcher) Count() uint64
func (*DisjunctionSliceSearcher) DocumentMatchPoolSize ¶
func (s *DisjunctionSliceSearcher) DocumentMatchPoolSize() int
func (*DisjunctionSliceSearcher) Min ¶
func (s *DisjunctionSliceSearcher) Min() int
func (*DisjunctionSliceSearcher) Next ¶
func (s *DisjunctionSliceSearcher) Next(ctx *search.Context) ( *search.DocumentMatch, error)
func (*DisjunctionSliceSearcher) Optimize ¶
func (s *DisjunctionSliceSearcher) Optimize(kind string, octx segment.OptimizableContext) ( segment.OptimizableContext, error)
a disjunction searcher implements the index.Optimizable interface but only activates on an edge case where the disjunction is a wrapper around a single Optimizable child searcher
func (*DisjunctionSliceSearcher) Size ¶
func (s *DisjunctionSliceSearcher) Size() int
type FilterFunc ¶
type FilterFunc func(d *search.DocumentMatch) bool
FilterFunc defines a function which can filter documents returning true means keep the document returning false means do not keep the document
type FilteringSearcher ¶
type FilteringSearcher struct {
// contains filtered or unexported fields
}
FilteringSearcher wraps any other searcher, but checks any Next/Advance call against the supplied FilterFunc
func NewFilteringSearcher ¶
func NewFilteringSearcher(s search.Searcher, filter FilterFunc) *FilteringSearcher
func (*FilteringSearcher) Advance ¶
func (f *FilteringSearcher) Advance(ctx *search.Context, number uint64) (*search.DocumentMatch, error)
func (*FilteringSearcher) Close ¶
func (f *FilteringSearcher) Close() error
func (*FilteringSearcher) Count ¶
func (f *FilteringSearcher) Count() uint64
func (*FilteringSearcher) DocumentMatchPoolSize ¶
func (f *FilteringSearcher) DocumentMatchPoolSize() int
func (*FilteringSearcher) Min ¶
func (f *FilteringSearcher) Min() int
func (*FilteringSearcher) Next ¶
func (f *FilteringSearcher) Next(ctx *search.Context) (*search.DocumentMatch, error)
func (*FilteringSearcher) Size ¶
func (f *FilteringSearcher) Size() int
type MatchAllSearcher ¶
type MatchAllSearcher struct {
// contains filtered or unexported fields
}
func NewMatchAllSearcher ¶
func NewMatchAllSearcher(indexReader search.Reader, boost float64, scorer search.Scorer, options search.SearcherOptions) (*MatchAllSearcher, error)
func (*MatchAllSearcher) Advance ¶
func (s *MatchAllSearcher) Advance(ctx *search.Context, number uint64) (*search.DocumentMatch, error)
func (*MatchAllSearcher) Close ¶
func (s *MatchAllSearcher) Close() error
func (*MatchAllSearcher) Count ¶
func (s *MatchAllSearcher) Count() uint64
func (*MatchAllSearcher) DocumentMatchPoolSize ¶
func (s *MatchAllSearcher) DocumentMatchPoolSize() int
func (*MatchAllSearcher) Min ¶
func (s *MatchAllSearcher) Min() int
func (*MatchAllSearcher) Next ¶
func (s *MatchAllSearcher) Next(ctx *search.Context) (*search.DocumentMatch, error)
func (*MatchAllSearcher) Size ¶
func (s *MatchAllSearcher) Size() int
type MatchNoneSearcher ¶
type MatchNoneSearcher struct{}
func NewMatchNoneSearcher ¶
func NewMatchNoneSearcher(indexReader search.Reader, options search.SearcherOptions) (*MatchNoneSearcher, error)
func (*MatchNoneSearcher) Advance ¶
func (s *MatchNoneSearcher) Advance(ctx *search.Context, number uint64) (*search.DocumentMatch, error)
func (*MatchNoneSearcher) Close ¶
func (s *MatchNoneSearcher) Close() error
func (*MatchNoneSearcher) Count ¶
func (s *MatchNoneSearcher) Count() uint64
func (*MatchNoneSearcher) DocumentMatchPoolSize ¶
func (s *MatchNoneSearcher) DocumentMatchPoolSize() int
func (*MatchNoneSearcher) Min ¶
func (s *MatchNoneSearcher) Min() int
func (*MatchNoneSearcher) Next ¶
func (s *MatchNoneSearcher) Next(ctx *search.Context) (*search.DocumentMatch, error)
func (*MatchNoneSearcher) SetQueryNorm ¶
func (s *MatchNoneSearcher) SetQueryNorm(_ float64)
func (*MatchNoneSearcher) Size ¶
func (s *MatchNoneSearcher) Size() int
func (*MatchNoneSearcher) Weight ¶
func (s *MatchNoneSearcher) Weight() float64
type OrderedSearcherList ¶
func (OrderedSearcherList) Len ¶
func (otrl OrderedSearcherList) Len() int
func (OrderedSearcherList) Less ¶
func (otrl OrderedSearcherList) Less(i, j int) bool
func (OrderedSearcherList) Swap ¶
func (otrl OrderedSearcherList) Swap(i, j int)
type PhraseSearcher ¶
type PhraseSearcher struct {
// contains filtered or unexported fields
}
func NewMultiPhraseSearcher ¶
func NewMultiPhraseSearcher(indexReader search.Reader, terms [][]string, field string, scorer search.Scorer, options search.SearcherOptions) (*PhraseSearcher, error)
func (*PhraseSearcher) Advance ¶
func (s *PhraseSearcher) Advance(ctx *search.Context, number uint64) (*search.DocumentMatch, error)
func (*PhraseSearcher) Close ¶
func (s *PhraseSearcher) Close() error
func (*PhraseSearcher) Count ¶
func (s *PhraseSearcher) Count() uint64
func (*PhraseSearcher) DocumentMatchPoolSize ¶
func (s *PhraseSearcher) DocumentMatchPoolSize() int
func (*PhraseSearcher) Min ¶
func (s *PhraseSearcher) Min() int
func (*PhraseSearcher) Next ¶
func (s *PhraseSearcher) Next(ctx *search.Context) (*search.DocumentMatch, error)
func (*PhraseSearcher) Size ¶
func (s *PhraseSearcher) Size() int
type TermSearcher ¶
type TermSearcher struct {
// contains filtered or unexported fields
}
func NewTermSearcher ¶
func NewTermSearcher(indexReader search.Reader, term, field string, boost float64, scorer search.Scorer, options search.SearcherOptions) (*TermSearcher, error)
func NewTermSearcherBytes ¶
func (*TermSearcher) Advance ¶
func (s *TermSearcher) Advance(ctx *search.Context, number uint64) (*search.DocumentMatch, error)
func (*TermSearcher) Close ¶
func (s *TermSearcher) Close() error
func (*TermSearcher) Count ¶
func (s *TermSearcher) Count() uint64
func (*TermSearcher) DocumentMatchPoolSize ¶
func (s *TermSearcher) DocumentMatchPoolSize() int
func (*TermSearcher) Min ¶
func (s *TermSearcher) Min() int
func (*TermSearcher) Next ¶
func (s *TermSearcher) Next(ctx *search.Context) (*search.DocumentMatch, error)
func (*TermSearcher) Optimize ¶
func (s *TermSearcher) Optimize(kind string, octx segment.OptimizableContext) ( segment.OptimizableContext, error)
func (*TermSearcher) Size ¶
func (s *TermSearcher) Size() int
Source Files ¶
- ordered_searchers_list.go
- search_boolean.go
- search_conjunction.go
- search_disjunction.go
- search_disjunction_heap.go
- search_disjunction_slice.go
- search_filter.go
- search_fuzzy.go
- search_geoboundingbox.go
- search_geopointdistance.go
- search_geopolygon.go
- search_match_all.go
- search_match_none.go
- search_multi_term.go
- search_numeric_range.go
- search_phrase.go
- search_regexp.go
- search_term.go
- search_term_prefix.go
- search_term_range.go
- size.go