Package org.apache.lucene.analysis.core
Class KeywordAnalyzer
- java.lang.Object
-
- org.apache.lucene.analysis.Analyzer
-
- org.apache.lucene.analysis.core.KeywordAnalyzer
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public final class KeywordAnalyzer extends Analyzer
"Tokenizes" the entire stream as a single token. This is useful for data like zip codes, ids, and some product names.- 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 KeywordAnalyzer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Analyzer.TokenStreamComponents
createComponents(String fieldName)
-
Methods inherited from class org.apache.lucene.analysis.Analyzer
attributeFactory, close, getOffsetGap, getPositionIncrementGap, getReuseStrategy, initReader, initReaderForNormalization, normalize, normalize, tokenStream, tokenStream
-
-
-
-
Method Detail
-
createComponents
protected Analyzer.TokenStreamComponents createComponents(String fieldName)
- Specified by:
createComponents
in classAnalyzer
-
-