@Override protected TokenStreamComponents createComponents(final String fieldName, final Reader reader) { final Tokenizer sink = new NumericTokenizer(reader, new DateNumericParser(), precisionStep); return new TokenStreamComponents(sink); }
@Override public final boolean incrementToken() throws IOException { // initialise the numeric attribute if (!isInitialised) { final long value = parser.parseAndConvert(this.input); numericAtt.init(parser.getNumericType(), value, parser.getValueSize()); isInitialised = true; } // this will only clear all other attributes in this TokenStream this.clearAttributes(); // increment the shift and generate next token final boolean hasNext = numericAtt.incrementShift(termAtt); // set other attributes after the call to incrementShift since getShift // is undefined before first call typeAtt.setType((numericAtt.getShift() == 0) ? NumericTokenStream.TOKEN_TYPE_FULL_PREC : NumericTokenStream.TOKEN_TYPE_LOWER_PREC); posIncrAtt.setPositionIncrement((numericAtt.getShift() == 0) ? 1 : 0); return hasNext; }
@Override protected TokenStreamComponents createComponents(final String fieldName, final Reader reader) { final Tokenizer sink = new NumericTokenizer(reader, new IntNumericParser(), precisionStep); return new TokenStreamComponents(sink); }
@Override protected TokenStreamComponents createComponents(final String fieldName, final Reader reader) { final Tokenizer sink = new NumericTokenizer(reader, new FloatNumericParser(), precisionStep); return new TokenStreamComponents(sink); }
@Override protected TokenStreamComponents createComponents(final String fieldName, final Reader reader) { final Tokenizer sink = new NumericTokenizer(reader, new DoubleNumericParser(), precisionStep); return new TokenStreamComponents(sink); }
@Override protected TokenStreamComponents createComponents(final String fieldName, final Reader reader) { final Tokenizer sink = new NumericTokenizer(reader, new LongNumericParser(), precisionStep); return new TokenStreamComponents(sink); }