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

package highlight

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

Index

Package Files

highlighter.go term_locations.go

type Fragment Uses

type Fragment struct {
    Orig           []byte
    ArrayPositions []uint64
    Start          int
    End            int
    Score          float64
    Index          int // used by heap
}

func (*Fragment) Overlaps Uses

func (f *Fragment) Overlaps(other *Fragment) bool

type FragmentFormatter Uses

type FragmentFormatter interface {
    Format(f *Fragment, orderedTermLocations TermLocations) string
}

type FragmentScorer Uses

type FragmentScorer interface {
    Score(f *Fragment) float64
}

type Fragmenter Uses

type Fragmenter interface {
    Fragment([]byte, TermLocations) []*Fragment
}

type Highlighter Uses

type Highlighter interface {
    Fragmenter() Fragmenter
    SetFragmenter(Fragmenter)

    FragmentFormatter() FragmentFormatter
    SetFragmentFormatter(FragmentFormatter)

    Separator() string
    SetSeparator(string)

    BestFragmentInField(*search.DocumentMatch, *document.Document, string) string
    BestFragmentsInField(*search.DocumentMatch, *document.Document, string, int) []string
}

type TermLocation Uses

type TermLocation struct {
    Term           string
    ArrayPositions search.ArrayPositions
    Pos            int
    Start          int
    End            int
}

func (*TermLocation) Overlaps Uses

func (tl *TermLocation) Overlaps(other *TermLocation) bool

type TermLocations Uses

type TermLocations []*TermLocation

func OrderTermLocations Uses

func OrderTermLocations(tlm search.TermLocationMap) TermLocations

func (TermLocations) Len Uses

func (t TermLocations) Len() int

func (TermLocations) Less Uses

func (t TermLocations) Less(i, j int) bool

func (TermLocations) MergeOverlapping Uses

func (t TermLocations) MergeOverlapping()

func (TermLocations) Swap Uses

func (t TermLocations) Swap(i, j int)

Directories

PathSynopsis
format/ansi
format/html
fragmenter/simple
highlighter/ansi
highlighter/html
highlighter/simple

Package highlight imports 4 packages (graph) and is imported by 113 packages. Updated 2017-02-10. Refresh now. Tools for package owners.