Documentation ¶
Index ¶
- Variables
- func BuildTermFromRunes(runes []rune) []byte
- func DeleteRune(in []rune, pos int) []rune
- func InsertRune(in []rune, pos int, r rune) []rune
- func RunesEndsWith(input []rune, suffix string) bool
- func TruncateRunes(input []byte, num int) []byte
- type Analyzer
- type ByteArrayConverter
- type CharFilter
- type DateTimeParser
- type Token
- type TokenFilter
- type TokenFreq
- type TokenFrequencies
- type TokenLocation
- type TokenMap
- type TokenStream
- type TokenType
- type Tokenizer
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidDateTime = fmt.Errorf("unable to parse datetime with any of the layouts")
Functions ¶
func BuildTermFromRunes ¶
func DeleteRune ¶
func RunesEndsWith ¶
func TruncateRunes ¶
Types ¶
type Analyzer ¶
type Analyzer struct { CharFilters []CharFilter Tokenizer Tokenizer TokenFilters []TokenFilter }
func (*Analyzer) Analyze ¶
func (a *Analyzer) Analyze(input []byte) TokenStream
type ByteArrayConverter ¶
type CharFilter ¶
type Token ¶
type TokenFilter ¶
type TokenFilter interface {
Filter(TokenStream) TokenStream
}
type TokenFreq ¶
type TokenFreq struct { Term []byte Locations []*TokenLocation }
type TokenFrequencies ¶
type TokenFrequencies []*TokenFreq
func TokenFrequency ¶
func TokenFrequency(tokens TokenStream, arrayPositions []uint64) TokenFrequencies
func (TokenFrequencies) MergeAll ¶
func (tfs TokenFrequencies) MergeAll(remoteField string, other TokenFrequencies) TokenFrequencies
type TokenLocation ¶
type TokenMap ¶
func NewTokenMap ¶
func NewTokenMap() TokenMap
type TokenStream ¶
type TokenStream []*Token
type Tokenizer ¶
type Tokenizer interface {
Tokenize([]byte) TokenStream
}
Directories ¶
Path | Synopsis |
---|---|
analyzers
|
|
byte_array_converters
|
|
char_filters
|
|
datetime_parsers
|
|
language
|
|
token_filters
|
|
tokenizers
|
|
Click to show internal directories.
Click to hide internal directories.