Java org.apache.lucene.analysis Analyzer fields, constructors, methods, implement or subclass

Example usage for Java org.apache.lucene.analysis Analyzer fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.lucene.analysis Analyzer.

The text is from its open source code.

Subclass

org.apache.lucene.analysis.Analyzer has subclasses.
Click this link to see all its subclasses.

Field

ReuseStrategyGLOBAL_REUSE_STRATEGY
A predefined ReuseStrategy that reuses the same components for every field.
ReuseStrategyPER_FIELD_REUSE_STRATEGY
A predefined ReuseStrategy that reuses components per-field by maintaining a Map of TokenStreamComponent per field name.

Constructor

Analyzer()
Create a new Analyzer, reusing the same set of components per-thread across calls to #tokenStream(String,Reader) .
Analyzer(ReuseStrategy reuseStrategy)
Expert: create a new Analyzer with a custom ReuseStrategy .

Method

voidclose()
Frees persistent resources used by this Analyzer
intgetOffsetGap(String fieldName)
Just like #getPositionIncrementGap , except for Token offsets instead.
intgetPositionIncrementGap(String fieldName)
Invoked before indexing a IndexableField instance if terms have already been added to that field.
ReuseStrategygetReuseStrategy()
Returns the used ReuseStrategy .
VersiongetVersion()
Return the version of Lucene this analyzer will mimic the behavior of for analysis.
TokenStreamnormalize(String fieldName, TokenStream in)
Wrap the given TokenStream in order to apply normalization filters.
BytesRefnormalize(final String fieldName, final String text)
Normalize a string down to the representation that it would have in the index.
voidsetVersion(Version v)
Set the version of Lucene this analyzer should mimic the behavior for for analysis.
TokenStreamtokenStream(final String fieldName, final Reader reader)
Returns a TokenStream suitable for fieldName, tokenizing the contents of reader.
TokenStreamtokenStream(final String fieldName, final String text)
Returns a TokenStream suitable for fieldName, tokenizing the contents of text.