Package org.apache.lucene.analysis.core
Class SimpleAnalyzer
- java.lang.Object
-
- org.apache.lucene.analysis.Analyzer
-
- org.apache.lucene.analysis.core.SimpleAnalyzer
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public final class SimpleAnalyzer extends Analyzer
- Since:
- 3.1
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.analysis.Analyzer
Analyzer.ReuseStrategy, Analyzer.TokenStreamComponents
-
-
Field Summary
-
Fields inherited from class org.apache.lucene.analysis.Analyzer
GLOBAL_REUSE_STRATEGY, PER_FIELD_REUSE_STRATEGY
-
-
Constructor Summary
Constructors Constructor Description SimpleAnalyzer()Creates a newSimpleAnalyzer
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Analyzer.TokenStreamComponentscreateComponents(String fieldName)Creates a newAnalyzer.TokenStreamComponentsinstance for this analyzer.protected TokenStreamnormalize(String fieldName, TokenStream in)Wrap the givenTokenStreamin order to apply normalization filters.-
Methods inherited from class org.apache.lucene.analysis.Analyzer
attributeFactory, close, getOffsetGap, getPositionIncrementGap, getReuseStrategy, getVersion, initReader, initReaderForNormalization, normalize, setVersion, tokenStream, tokenStream
-
-
-
-
Constructor Detail
-
SimpleAnalyzer
public SimpleAnalyzer()
Creates a newSimpleAnalyzer
-
-
Method Detail
-
createComponents
protected Analyzer.TokenStreamComponents createComponents(String fieldName)
Description copied from class:AnalyzerCreates a newAnalyzer.TokenStreamComponentsinstance for this analyzer.- Specified by:
createComponentsin classAnalyzer- Parameters:
fieldName- the name of the fields content passed to theAnalyzer.TokenStreamComponentssink as a reader- Returns:
- the
Analyzer.TokenStreamComponentsfor this analyzer.
-
normalize
protected TokenStream normalize(String fieldName, TokenStream in)
Description copied from class:AnalyzerWrap the givenTokenStreamin order to apply normalization filters. The default implementation returns theTokenStreamas-is. This is used byAnalyzer.normalize(String, String).
-
-