bleve: github.com/blevesearch/bleve/search/highlight/highlighter/simple Index | Files

package simple

import "github.com/blevesearch/bleve/search/highlight/highlighter/simple"

Index

Package Files

fragment_scorer_simple.go highlighter_simple.go

Constants

const DefaultSeparator = "…"
const Name = "simple"

func Constructor Uses

func Constructor(config map[string]interface{}, cache *registry.Cache) (highlight.Highlighter, error)

type FragmentQueue Uses

type FragmentQueue []*highlight.Fragment

FragmentQueue implements heap.Interface and holds Items.

func (FragmentQueue) Len Uses

func (fq FragmentQueue) Len() int

func (FragmentQueue) Less Uses

func (fq FragmentQueue) Less(i, j int) bool

func (*FragmentQueue) Pop Uses

func (fq *FragmentQueue) Pop() interface{}

func (*FragmentQueue) Push Uses

func (fq *FragmentQueue) Push(x interface{})

func (FragmentQueue) Swap Uses

func (fq FragmentQueue) Swap(i, j int)

type FragmentScorer Uses

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

FragmentScorer will score fragments by how many unique terms occur in the fragment with no regard for any boost values used in the original query

func NewFragmentScorer Uses

func NewFragmentScorer(tlm search.TermLocationMap) *FragmentScorer

func (*FragmentScorer) Score Uses

func (s *FragmentScorer) Score(f *highlight.Fragment)

type Highlighter Uses

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

func NewHighlighter Uses

func NewHighlighter(fragmenter highlight.Fragmenter, formatter highlight.FragmentFormatter, separator string) *Highlighter

func (*Highlighter) BestFragmentInField Uses

func (s *Highlighter) BestFragmentInField(dm *search.DocumentMatch, doc *document.Document, field string) string

func (*Highlighter) BestFragmentsInField Uses

func (s *Highlighter) BestFragmentsInField(dm *search.DocumentMatch, doc *document.Document, field string, num int) []string

func (*Highlighter) FragmentFormatter Uses

func (s *Highlighter) FragmentFormatter() highlight.FragmentFormatter

func (*Highlighter) Fragmenter Uses

func (s *Highlighter) Fragmenter() highlight.Fragmenter

func (*Highlighter) Separator Uses

func (s *Highlighter) Separator() string

func (*Highlighter) SetFragmentFormatter Uses

func (s *Highlighter) SetFragmentFormatter(f highlight.FragmentFormatter)

func (*Highlighter) SetFragmenter Uses

func (s *Highlighter) SetFragmenter(f highlight.Fragmenter)

func (*Highlighter) SetSeparator Uses

func (s *Highlighter) SetSeparator(sep string)

Package simple imports 6 packages (graph) and is imported by 15 packages. Updated 2017-02-11. Refresh now. Tools for package owners.