bleve: github.com/blevesearch/bleve/search/searcher Index | Files

package searcher

import "github.com/blevesearch/bleve/search/searcher"

Index

Package Files

ordered_searchers_list.go search_boolean.go search_conjunction.go search_disjunction.go search_disjunction_heap.go search_disjunction_slice.go search_docid.go search_filter.go search_fuzzy.go search_geoboundingbox.go search_geopointdistance.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

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 MaxFuzziness = 2

func ComputeGeoRange Uses

func ComputeGeoRange(term uint64, shift uint,
    sminLon, sminLat, smaxLon, smaxLat float64,
    checkBoundaries bool) (
    onBoundary [][]byte, notOnBoundary [][]byte)

func NewDisjunctionSearcher Uses

func NewDisjunctionSearcher(indexReader index.IndexReader,
    qsearchers []search.Searcher, min float64, options search.SearcherOptions) (
    search.Searcher, error)

func NewFuzzySearcher Uses

func NewFuzzySearcher(indexReader index.IndexReader, term string,
    prefix, fuzziness int, field string, boost float64,
    options search.SearcherOptions) (search.Searcher, error)

func NewGeoBoundingBoxSearcher Uses

func NewGeoBoundingBoxSearcher(indexReader index.IndexReader, minLon, minLat,
    maxLon, maxLat float64, field string, boost float64,
    options search.SearcherOptions, checkBoundaries bool) (
    search.Searcher, error)

func NewGeoPointDistanceSearcher Uses

func NewGeoPointDistanceSearcher(indexReader index.IndexReader, centerLon,
    centerLat, dist float64, field string, boost float64,
    options search.SearcherOptions) (search.Searcher, error)

func NewMultiTermSearcher Uses

func NewMultiTermSearcher(indexReader index.IndexReader, terms []string,
    field string, boost float64, options search.SearcherOptions, limit bool) (
    search.Searcher, error)

func NewMultiTermSearcherBytes Uses

func NewMultiTermSearcherBytes(indexReader index.IndexReader, terms [][]byte,
    field string, boost float64, options search.SearcherOptions, limit bool) (
    search.Searcher, error)

func NewNumericRangeSearcher Uses

func NewNumericRangeSearcher(indexReader index.IndexReader,
    min *float64, max *float64, inclusiveMin, inclusiveMax *bool, field string,
    boost float64, options search.SearcherOptions) (search.Searcher, error)

func NewRegexpSearcher Uses

func NewRegexpSearcher(indexReader index.IndexReader, pattern index.Regexp,
    field string, boost float64, options search.SearcherOptions) (
    search.Searcher, error)

NewRegexpSearcher creates a searcher which will match documents that contain terms which match the pattern regexp. The match must be EXACT matching the entire term. The provided regexp SHOULD NOT start with ^ or end with $ as this can intefere with the implementation. Separately, matches will be checked to ensure they match the entire term.

func NewRegexpStringSearcher Uses

func NewRegexpStringSearcher(indexReader index.IndexReader, pattern string,
    field string, boost float64, options search.SearcherOptions) (
    search.Searcher, error)

NewRegexpStringSearcher is similar to NewRegexpSearcher, but additionally optimizes for index readers that handle regexp's.

func NewTermPrefixSearcher Uses

func NewTermPrefixSearcher(indexReader index.IndexReader, prefix string,
    field string, boost float64, options search.SearcherOptions) (
    search.Searcher, error)

func NewTermRangeSearcher Uses

func NewTermRangeSearcher(indexReader index.IndexReader,
    min, max []byte, inclusiveMin, inclusiveMax *bool, field string,
    boost float64, options search.SearcherOptions) (search.Searcher, error)

type BooleanSearcher Uses

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

func NewBooleanSearcher Uses

func NewBooleanSearcher(indexReader index.IndexReader, mustSearcher search.Searcher, shouldSearcher search.Searcher, mustNotSearcher search.Searcher, options search.SearcherOptions) (*BooleanSearcher, error)

func (*BooleanSearcher) Advance Uses

func (s *BooleanSearcher) Advance(ctx *search.SearchContext, ID index.IndexInternalID) (*search.DocumentMatch, error)

func (*BooleanSearcher) Close Uses

func (s *BooleanSearcher) Close() error

func (*BooleanSearcher) Count Uses

func (s *BooleanSearcher) Count() uint64

func (*BooleanSearcher) DocumentMatchPoolSize Uses

func (s *BooleanSearcher) DocumentMatchPoolSize() int

func (*BooleanSearcher) Min Uses

func (s *BooleanSearcher) Min() int

func (*BooleanSearcher) Next Uses

func (s *BooleanSearcher) Next(ctx *search.SearchContext) (*search.DocumentMatch, error)

func (*BooleanSearcher) SetQueryNorm Uses

func (s *BooleanSearcher) SetQueryNorm(qnorm float64)

func (*BooleanSearcher) Size Uses

func (s *BooleanSearcher) Size() int

func (*BooleanSearcher) Weight Uses

func (s *BooleanSearcher) Weight() float64

type ConjunctionSearcher Uses

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

func NewConjunctionSearcher Uses

func NewConjunctionSearcher(indexReader index.IndexReader, qsearchers []search.Searcher, options search.SearcherOptions) (*ConjunctionSearcher, error)

func (*ConjunctionSearcher) Advance Uses

func (s *ConjunctionSearcher) Advance(ctx *search.SearchContext, ID index.IndexInternalID) (*search.DocumentMatch, error)

func (*ConjunctionSearcher) Close Uses

func (s *ConjunctionSearcher) Close() (rv error)

func (*ConjunctionSearcher) Count Uses

func (s *ConjunctionSearcher) Count() uint64

func (*ConjunctionSearcher) DocumentMatchPoolSize Uses

func (s *ConjunctionSearcher) DocumentMatchPoolSize() int

func (*ConjunctionSearcher) Min Uses

func (s *ConjunctionSearcher) Min() int

func (*ConjunctionSearcher) Next Uses

func (s *ConjunctionSearcher) Next(ctx *search.SearchContext) (*search.DocumentMatch, error)

func (*ConjunctionSearcher) SetQueryNorm Uses

func (s *ConjunctionSearcher) SetQueryNorm(qnorm float64)

func (*ConjunctionSearcher) Size Uses

func (s *ConjunctionSearcher) Size() int

func (*ConjunctionSearcher) Weight Uses

func (s *ConjunctionSearcher) Weight() float64

type DisjunctionHeapSearcher Uses

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

func (*DisjunctionHeapSearcher) Advance Uses

func (s *DisjunctionHeapSearcher) Advance(ctx *search.SearchContext,
    ID index.IndexInternalID) (*search.DocumentMatch, error)

func (*DisjunctionHeapSearcher) Close Uses

func (s *DisjunctionHeapSearcher) Close() (rv error)

func (*DisjunctionHeapSearcher) Count Uses

func (s *DisjunctionHeapSearcher) Count() uint64

func (*DisjunctionHeapSearcher) DocumentMatchPoolSize Uses

func (s *DisjunctionHeapSearcher) DocumentMatchPoolSize() int

func (*DisjunctionHeapSearcher) Len Uses

func (s *DisjunctionHeapSearcher) Len() int

func (*DisjunctionHeapSearcher) Less Uses

func (s *DisjunctionHeapSearcher) Less(i, j int) bool

func (*DisjunctionHeapSearcher) Min Uses

func (s *DisjunctionHeapSearcher) Min() int

func (*DisjunctionHeapSearcher) Next Uses

func (s *DisjunctionHeapSearcher) Next(ctx *search.SearchContext) (
    *search.DocumentMatch, error)

func (*DisjunctionHeapSearcher) Optimize Uses

func (s *DisjunctionHeapSearcher) Optimize(kind string, octx index.OptimizableContext) (
    index.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 Uses

func (s *DisjunctionHeapSearcher) Pop() interface{}

func (*DisjunctionHeapSearcher) Push Uses

func (s *DisjunctionHeapSearcher) Push(x interface{})

func (*DisjunctionHeapSearcher) SetQueryNorm Uses

func (s *DisjunctionHeapSearcher) SetQueryNorm(qnorm float64)

func (*DisjunctionHeapSearcher) Size Uses

func (s *DisjunctionHeapSearcher) Size() int

func (*DisjunctionHeapSearcher) Swap Uses

func (s *DisjunctionHeapSearcher) Swap(i, j int)

func (*DisjunctionHeapSearcher) Weight Uses

func (s *DisjunctionHeapSearcher) Weight() float64

type DisjunctionSliceSearcher Uses

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

func (*DisjunctionSliceSearcher) Advance Uses

func (s *DisjunctionSliceSearcher) Advance(ctx *search.SearchContext,
    ID index.IndexInternalID) (*search.DocumentMatch, error)

func (*DisjunctionSliceSearcher) Close Uses

func (s *DisjunctionSliceSearcher) Close() (rv error)

func (*DisjunctionSliceSearcher) Count Uses

func (s *DisjunctionSliceSearcher) Count() uint64

func (*DisjunctionSliceSearcher) DocumentMatchPoolSize Uses

func (s *DisjunctionSliceSearcher) DocumentMatchPoolSize() int

func (*DisjunctionSliceSearcher) Min Uses

func (s *DisjunctionSliceSearcher) Min() int

func (*DisjunctionSliceSearcher) Next Uses

func (s *DisjunctionSliceSearcher) Next(ctx *search.SearchContext) (
    *search.DocumentMatch, error)

func (*DisjunctionSliceSearcher) Optimize Uses

func (s *DisjunctionSliceSearcher) Optimize(kind string, octx index.OptimizableContext) (
    index.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) SetQueryNorm Uses

func (s *DisjunctionSliceSearcher) SetQueryNorm(qnorm float64)

func (*DisjunctionSliceSearcher) Size Uses

func (s *DisjunctionSliceSearcher) Size() int

func (*DisjunctionSliceSearcher) Weight Uses

func (s *DisjunctionSliceSearcher) Weight() float64

type DocIDSearcher Uses

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

DocIDSearcher returns documents matching a predefined set of identifiers.

func NewDocIDSearcher Uses

func NewDocIDSearcher(indexReader index.IndexReader, ids []string, boost float64,
    options search.SearcherOptions) (searcher *DocIDSearcher, err error)

func (*DocIDSearcher) Advance Uses

func (s *DocIDSearcher) Advance(ctx *search.SearchContext, ID index.IndexInternalID) (*search.DocumentMatch, error)

func (*DocIDSearcher) Close Uses

func (s *DocIDSearcher) Close() error

func (*DocIDSearcher) Count Uses

func (s *DocIDSearcher) Count() uint64

func (*DocIDSearcher) DocumentMatchPoolSize Uses

func (s *DocIDSearcher) DocumentMatchPoolSize() int

func (*DocIDSearcher) Min Uses

func (s *DocIDSearcher) Min() int

func (*DocIDSearcher) Next Uses

func (s *DocIDSearcher) Next(ctx *search.SearchContext) (*search.DocumentMatch, error)

func (*DocIDSearcher) SetQueryNorm Uses

func (s *DocIDSearcher) SetQueryNorm(qnorm float64)

func (*DocIDSearcher) Size Uses

func (s *DocIDSearcher) Size() int

func (*DocIDSearcher) Weight Uses

func (s *DocIDSearcher) Weight() float64

type FilterFunc Uses

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 Uses

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 Uses

func NewFilteringSearcher(s search.Searcher, filter FilterFunc) *FilteringSearcher

func (*FilteringSearcher) Advance Uses

func (f *FilteringSearcher) Advance(ctx *search.SearchContext, ID index.IndexInternalID) (*search.DocumentMatch, error)

func (*FilteringSearcher) Close Uses

func (f *FilteringSearcher) Close() error

func (*FilteringSearcher) Count Uses

func (f *FilteringSearcher) Count() uint64

func (*FilteringSearcher) DocumentMatchPoolSize Uses

func (f *FilteringSearcher) DocumentMatchPoolSize() int

func (*FilteringSearcher) Min Uses

func (f *FilteringSearcher) Min() int

func (*FilteringSearcher) Next Uses

func (f *FilteringSearcher) Next(ctx *search.SearchContext) (*search.DocumentMatch, error)

func (*FilteringSearcher) SetQueryNorm Uses

func (f *FilteringSearcher) SetQueryNorm(n float64)

func (*FilteringSearcher) Size Uses

func (f *FilteringSearcher) Size() int

func (*FilteringSearcher) Weight Uses

func (f *FilteringSearcher) Weight() float64

type MatchAllSearcher Uses

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

func NewMatchAllSearcher Uses

func NewMatchAllSearcher(indexReader index.IndexReader, boost float64, options search.SearcherOptions) (*MatchAllSearcher, error)

func (*MatchAllSearcher) Advance Uses

func (s *MatchAllSearcher) Advance(ctx *search.SearchContext, ID index.IndexInternalID) (*search.DocumentMatch, error)

func (*MatchAllSearcher) Close Uses

func (s *MatchAllSearcher) Close() error

func (*MatchAllSearcher) Count Uses

func (s *MatchAllSearcher) Count() uint64

func (*MatchAllSearcher) DocumentMatchPoolSize Uses

func (s *MatchAllSearcher) DocumentMatchPoolSize() int

func (*MatchAllSearcher) Min Uses

func (s *MatchAllSearcher) Min() int

func (*MatchAllSearcher) Next Uses

func (s *MatchAllSearcher) Next(ctx *search.SearchContext) (*search.DocumentMatch, error)

func (*MatchAllSearcher) SetQueryNorm Uses

func (s *MatchAllSearcher) SetQueryNorm(qnorm float64)

func (*MatchAllSearcher) Size Uses

func (s *MatchAllSearcher) Size() int

func (*MatchAllSearcher) Weight Uses

func (s *MatchAllSearcher) Weight() float64

type MatchNoneSearcher Uses

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

func NewMatchNoneSearcher Uses

func NewMatchNoneSearcher(indexReader index.IndexReader) (*MatchNoneSearcher, error)

func (*MatchNoneSearcher) Advance Uses

func (s *MatchNoneSearcher) Advance(ctx *search.SearchContext, ID index.IndexInternalID) (*search.DocumentMatch, error)

func (*MatchNoneSearcher) Close Uses

func (s *MatchNoneSearcher) Close() error

func (*MatchNoneSearcher) Count Uses

func (s *MatchNoneSearcher) Count() uint64

func (*MatchNoneSearcher) DocumentMatchPoolSize Uses

func (s *MatchNoneSearcher) DocumentMatchPoolSize() int

func (*MatchNoneSearcher) Min Uses

func (s *MatchNoneSearcher) Min() int

func (*MatchNoneSearcher) Next Uses

func (s *MatchNoneSearcher) Next(ctx *search.SearchContext) (*search.DocumentMatch, error)

func (*MatchNoneSearcher) SetQueryNorm Uses

func (s *MatchNoneSearcher) SetQueryNorm(qnorm float64)

func (*MatchNoneSearcher) Size Uses

func (s *MatchNoneSearcher) Size() int

func (*MatchNoneSearcher) Weight Uses

func (s *MatchNoneSearcher) Weight() float64

type OrderedSearcherList Uses

type OrderedSearcherList []search.Searcher

func (OrderedSearcherList) Len Uses

func (otrl OrderedSearcherList) Len() int

func (OrderedSearcherList) Less Uses

func (otrl OrderedSearcherList) Less(i, j int) bool

func (OrderedSearcherList) Swap Uses

func (otrl OrderedSearcherList) Swap(i, j int)

type PhraseSearcher Uses

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

func NewMultiPhraseSearcher Uses

func NewMultiPhraseSearcher(indexReader index.IndexReader, terms [][]string, field string, options search.SearcherOptions) (*PhraseSearcher, error)

func NewPhraseSearcher Uses

func NewPhraseSearcher(indexReader index.IndexReader, terms []string, field string, options search.SearcherOptions) (*PhraseSearcher, error)

func (*PhraseSearcher) Advance Uses

func (s *PhraseSearcher) Advance(ctx *search.SearchContext, ID index.IndexInternalID) (*search.DocumentMatch, error)

func (*PhraseSearcher) Close Uses

func (s *PhraseSearcher) Close() error

func (*PhraseSearcher) Count Uses

func (s *PhraseSearcher) Count() uint64

func (*PhraseSearcher) DocumentMatchPoolSize Uses

func (s *PhraseSearcher) DocumentMatchPoolSize() int

func (*PhraseSearcher) Min Uses

func (s *PhraseSearcher) Min() int

func (*PhraseSearcher) Next Uses

func (s *PhraseSearcher) Next(ctx *search.SearchContext) (*search.DocumentMatch, error)

func (*PhraseSearcher) SetQueryNorm Uses

func (s *PhraseSearcher) SetQueryNorm(qnorm float64)

func (*PhraseSearcher) Size Uses

func (s *PhraseSearcher) Size() int

func (*PhraseSearcher) Weight Uses

func (s *PhraseSearcher) Weight() float64

type SearcherCurr Uses

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

type TermSearcher Uses

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

func NewTermSearcher Uses

func NewTermSearcher(indexReader index.IndexReader, term string, field string, boost float64, options search.SearcherOptions) (*TermSearcher, error)

func NewTermSearcherBytes Uses

func NewTermSearcherBytes(indexReader index.IndexReader, term []byte, field string, boost float64, options search.SearcherOptions) (*TermSearcher, error)

func (*TermSearcher) Advance Uses

func (s *TermSearcher) Advance(ctx *search.SearchContext, ID index.IndexInternalID) (*search.DocumentMatch, error)

func (*TermSearcher) Close Uses

func (s *TermSearcher) Close() error

func (*TermSearcher) Count Uses

func (s *TermSearcher) Count() uint64

func (*TermSearcher) DocumentMatchPoolSize Uses

func (s *TermSearcher) DocumentMatchPoolSize() int

func (*TermSearcher) Min Uses

func (s *TermSearcher) Min() int

func (*TermSearcher) Next Uses

func (s *TermSearcher) Next(ctx *search.SearchContext) (*search.DocumentMatch, error)

func (*TermSearcher) Optimize Uses

func (s *TermSearcher) Optimize(kind string, octx index.OptimizableContext) (
    index.OptimizableContext, error)

func (*TermSearcher) SetQueryNorm Uses

func (s *TermSearcher) SetQueryNorm(qnorm float64)

func (*TermSearcher) Size Uses

func (s *TermSearcher) Size() int

func (*TermSearcher) Weight Uses

func (s *TermSearcher) Weight() float64

Package searcher imports 14 packages (graph) and is imported by 12 packages. Updated 2018-11-10. Refresh now. Tools for package owners.