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, restoreState
public 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.TokenStream
IOException
public final boolean incrementToken() throws IOException
incrementToken
in class org.apache.lucene.analysis.TokenStream
IOException
Copyright © 2014. All rights reserved.