Package org.apache.lucene.analysis
Class KeywordAnalyzer
- java.lang.Object
-
- org.apache.lucene.analysis.Analyzer
-
- org.apache.lucene.analysis.ReusableAnalyzerBase
-
- org.apache.lucene.analysis.KeywordAnalyzer
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public final class KeywordAnalyzer extends ReusableAnalyzerBase
"Tokenizes" the entire stream as a single token. This is useful for data like zip codes, ids, and some product names.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
-
-
Constructor Summary
Constructors Constructor Description KeywordAnalyzer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ReusableAnalyzerBase.TokenStreamComponentscreateComponents(String fieldName, Reader reader)Creates a newReusableAnalyzerBase.TokenStreamComponentsinstance for this analyzer.-
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
-
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
-
-
-
-
Method Detail
-
createComponents
protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName, Reader reader)
Description copied from class:ReusableAnalyzerBaseCreates a newReusableAnalyzerBase.TokenStreamComponentsinstance for this analyzer.- Specified by:
createComponentsin classReusableAnalyzerBase- Parameters:
fieldName- the name of the fields content passed to theReusableAnalyzerBase.TokenStreamComponentssink as a readerreader- the reader passed to theTokenizerconstructor- Returns:
- the
ReusableAnalyzerBase.TokenStreamComponentsfor this analyzer.
-
-