public final class WhitespaceAnalyzer extends ReusableAnalyzerBase
WhitespaceTokenizer
.
You must specify the required Version
compatibility
when creating CharTokenizer
:
WhitespaceTokenizer
uses an int based API to normalize and
detect token codepoints. See CharTokenizer.isTokenChar(int)
and
CharTokenizer.normalize(int)
for details.ReusableAnalyzerBase.TokenStreamComponents
Constructor and Description |
---|
WhitespaceAnalyzer()
Deprecated.
use
WhitespaceAnalyzer(Version) instead |
WhitespaceAnalyzer(Version matchVersion)
Creates a new
WhitespaceAnalyzer |
Modifier and Type | Method and Description |
---|---|
protected ReusableAnalyzerBase.TokenStreamComponents |
createComponents(String fieldName,
Reader reader)
Creates a new
ReusableAnalyzerBase.TokenStreamComponents instance for this analyzer. |
initReader, reusableTokenStream, tokenStream
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
public WhitespaceAnalyzer(Version matchVersion)
WhitespaceAnalyzer
matchVersion
- Lucene version to match See above@Deprecated public WhitespaceAnalyzer()
WhitespaceAnalyzer(Version)
insteadWhitespaceAnalyzer
protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName, Reader reader)
ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
instance for this analyzer.createComponents
in class ReusableAnalyzerBase
fieldName
- the name of the fields content passed to the
ReusableAnalyzerBase.TokenStreamComponents
sink as a readerreader
- the reader passed to the Tokenizer
constructorReusableAnalyzerBase.TokenStreamComponents
for this analyzer.