public class NumericTokenizer
extends org.apache.lucene.analysis.Tokenizer
NumericAnalyzer.
This tokenizer expects to receive a string representation of a numeric value
as input. It parses the input using NumericAnalyzer.NumericParser.parseAndConvert(Reader),
and uses a NodeNumericTermAttribute to generate the numeric token.
| Constructor and Description |
|---|
NumericTokenizer(Reader input,
NumericAnalyzer.NumericParser<? extends Number> parser,
int precisionStep)
Creates a token stream for numeric values with the specified
precisionStep. |
NumericTokenizer(Reader input,
NumericAnalyzer.NumericParser<? extends Number> parser,
int precisionStep,
org.apache.lucene.util.AttributeSource.AttributeFactory factory)
Expert: Creates a token stream for numeric values with the specified
precisionStep using the given
AttributeSource.AttributeFactory. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
incrementToken() |
void |
reset() |
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreStatepublic NumericTokenizer(Reader input, NumericAnalyzer.NumericParser<? extends Number> parser, int precisionStep)
precisionStep.public NumericTokenizer(Reader input, NumericAnalyzer.NumericParser<? extends Number> parser, int precisionStep, org.apache.lucene.util.AttributeSource.AttributeFactory factory)
precisionStep using the given
AttributeSource.AttributeFactory.public void reset()
throws IOException
reset in class org.apache.lucene.analysis.TokenStreamIOExceptionpublic final boolean incrementToken()
throws IOException
incrementToken in class org.apache.lucene.analysis.TokenStreamIOExceptionCopyright © 2014. All rights reserved.