util

package
v0.0.0-...-f9ccc49 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2015 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CharacterUtils

type CharacterUtils struct {
	CharacterUtilsSPI
}

Characterutils provides a unified interface to Character-related operations to implement backwards compatible character operations based on a version instance.

func GetCharacterUtils

func GetCharacterUtils(matchVersion util.Version) *CharacterUtils

Returns a Characters implementation according to the given Version instance.

func (*CharacterUtils) ToLowerCase

func (cu *CharacterUtils) ToLowerCase(buffer []rune)

Converts each unicode codepoint to lowerCase via unicode.ToLower().

type CharacterUtilsSPI

type CharacterUtilsSPI interface{}

type FilteringTokenFilter

type FilteringTokenFilter struct {
	*TokenFilter
	// contains filtered or unexported fields
}

Abstract base class for TokenFilters that may remove tokens. You have to implement Accept() and return a boolean if the current token should be preserved. IncrementToken() uses this method to decide if a token should be passed to the caller.

As for Lucene 4.4, GoLucene would panic when trying to disable position increments when filtering terms.

func NewFilteringTokenFilter

func NewFilteringTokenFilter(spi FilteringTokenFilterSPI,
	version util.Version, in TokenStream) *FilteringTokenFilter

Creates a new FilteringTokenFilter.

func (*FilteringTokenFilter) End

func (f *FilteringTokenFilter) End() error

func (*FilteringTokenFilter) IncrementToken

func (f *FilteringTokenFilter) IncrementToken() (bool, error)

func (*FilteringTokenFilter) Reset

func (f *FilteringTokenFilter) Reset() error

type FilteringTokenFilterSPI

type FilteringTokenFilterSPI interface {
	// Override this method and return if the current input token
	// should be returned by IncrementToken().
	Accept() bool
}

type StopwordAnalyzerBase

type StopwordAnalyzerBase struct {
	*AnalyzerImpl
	// contains filtered or unexported fields
}

Base class for Analyzers that need to make use of stopword sets.

func NewStopwordAnalyzerBaseWithStopWords

func NewStopwordAnalyzerBaseWithStopWords(stopwords map[string]bool) *StopwordAnalyzerBase

Jump to

Keyboard shortcuts

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