token

package
v1.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2026 License: Apache-2.0 Imports: 14 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const SynonymsDir = "synonyms"

SynonymsDir is the directory under the data path synonyms_path is read from, so that it cannot reach the metadata or index data.

Variables

View Source
var SynonymSetLookup func(id string) ([]string, error)

SynonymSetLookup returns the rules of a stored synonyms set. It is set by the package owning the synonyms set storage.

Functions

func NewDictTokenFilter

func NewDictTokenFilter(options interface{}) (analysis.TokenFilter, error)

func NewEdgeNgramTokenFilter

func NewEdgeNgramTokenFilter(options interface{}) (analysis.TokenFilter, error)

func NewElisionTokenFilter

func NewElisionTokenFilter(options interface{}) (analysis.TokenFilter, error)

func NewKeywordTokenFilter

func NewKeywordTokenFilter(options interface{}) (analysis.TokenFilter, error)

func NewLengthTokenFilter

func NewLengthTokenFilter(options interface{}) (analysis.TokenFilter, error)

func NewNgramTokenFilter

func NewNgramTokenFilter(options interface{}) (analysis.TokenFilter, error)

func NewRegexpTokenFilter

func NewRegexpTokenFilter(options interface{}) (analysis.TokenFilter, error)

func NewShingleTokenFilter

func NewShingleTokenFilter(options interface{}) (analysis.TokenFilter, error)

func NewStopTokenFilter

func NewStopTokenFilter(options interface{}) (analysis.TokenFilter, error)

func NewSynonymTokenFilter added in v1.4.0

func NewSynonymTokenFilter(options interface{}) (analysis.TokenFilter, error)

NewSynonymTokenFilter builds the synonym and synonym_graph token filters.

func NewTrimTokenFilter

func NewTrimTokenFilter() (analysis.TokenFilter, error)

func NewTruncateTokenFilter

func NewTruncateTokenFilter(options interface{}) (analysis.TokenFilter, error)

func NewUnicodenormTokenFilter

func NewUnicodenormTokenFilter(options interface{}) (analysis.TokenFilter, error)

func NewUpperCaseTokenFilter

func NewUpperCaseTokenFilter() (analysis.TokenFilter, error)

func ValidateSynonymRule added in v1.4.0

func ValidateSynonymRule(rule string) error

ValidateSynonymRule reports whether rule is a valid Solr synonym rule.

Types

type SynonymTokenFilter added in v1.4.0

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

SynonymTokenFilter replaces token sequences matching a synonym rule with their synonyms, alternates stacked at the same position.

func (*SynonymTokenFilter) Filter added in v1.4.0

func (*SynonymTokenFilter) Normalized added in v1.4.0

Normalized returns a copy of f whose rule terms are first run through the token filters preceding it in an analyzer, as Elasticsearch does.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL