Examples of NumericTokenStream


Examples of org.apache.lucene.analysis.NumericTokenStream

* @author kimchy (shay.banon)
*/
public class NumericDateTokenizer extends NumericTokenizer {

    public NumericDateTokenizer(Reader reader, int precisionStep, DateTimeFormatter dateTimeFormatter) throws IOException {
        super(reader, new NumericTokenStream(precisionStep), dateTimeFormatter);
    }
View Full Code Here

Examples of org.apache.lucene.analysis.NumericTokenStream

    public NumericDateTokenizer(Reader reader, int precisionStep, DateTimeFormatter dateTimeFormatter) throws IOException {
        super(reader, new NumericTokenStream(precisionStep), dateTimeFormatter);
    }

    public NumericDateTokenizer(Reader reader, int precisionStep, char[] buffer, DateTimeFormatter dateTimeFormatter) throws IOException {
        super(reader, new NumericTokenStream(precisionStep), buffer, dateTimeFormatter);
    }
View Full Code Here

Examples of org.apache.lucene.analysis.NumericTokenStream

* @author kimchy (shay.banon)
*/
public class NumericDoubleTokenizer extends NumericTokenizer {

    public NumericDoubleTokenizer(Reader reader, int precisionStep) throws IOException {
        super(reader, new NumericTokenStream(precisionStep), null);
    }
View Full Code Here

Examples of org.apache.lucene.analysis.NumericTokenStream

    public NumericDoubleTokenizer(Reader reader, int precisionStep) throws IOException {
        super(reader, new NumericTokenStream(precisionStep), null);
    }

    public NumericDoubleTokenizer(Reader reader, int precisionStep, char[] buffer) throws IOException {
        super(reader, new NumericTokenStream(precisionStep), buffer, null);
    }
View Full Code Here

Examples of org.apache.lucene.analysis.NumericTokenStream

* @author kimchy (shay.banon)
*/
public class NumericFloatTokenizer extends NumericTokenizer {

    public NumericFloatTokenizer(Reader reader, int precisionStep) throws IOException {
        super(reader, new NumericTokenStream(precisionStep), null);
    }
View Full Code Here

Examples of org.apache.lucene.analysis.NumericTokenStream

    public NumericFloatTokenizer(Reader reader, int precisionStep) throws IOException {
        super(reader, new NumericTokenStream(precisionStep), null);
    }

    public NumericFloatTokenizer(Reader reader, int precisionStep, char[] buffer) throws IOException {
        super(reader, new NumericTokenStream(precisionStep), buffer, null);
    }
View Full Code Here

Examples of org.apache.lucene.analysis.NumericTokenStream

    switch (type) {
      case INTEGER:
        int i = Integer.parseInt(externalVal);
        if (stored) arr = toArr(i);
        if (indexed) ts = new NumericTokenStream(ps).setIntValue(i);
        break;
      case FLOAT:
        float f = Float.parseFloat(externalVal);
        if (stored) arr = toArr(f);
        if (indexed) ts = new NumericTokenStream(ps).setFloatValue(f);
        break;
      case LONG:
        long l = Long.parseLong(externalVal);
        if (stored) arr = toArr(l);
        if (indexed) ts = new NumericTokenStream(ps).setLongValue(l);
        break;
      case DOUBLE:
        double d = Double.parseDouble(externalVal);
        if (stored) arr = toArr(d);
        if (indexed) ts = new NumericTokenStream(ps).setDoubleValue(d);
        break;
      case DATE:
        long time = dateField.parseMath(null, externalVal).getTime();
        if (stored) arr = toArr(time);
        if (indexed) ts = new NumericTokenStream(ps).setLongValue(time);
        break;
      default:
        throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Unknown type for trie field: " + type);
    }
View Full Code Here

Examples of org.apache.lucene.analysis.NumericTokenStream

    byte[] arr=null;
    TokenStream ts=null;

    long time = super.parseMath(null, externalVal).getTime();
    if (stored) arr = TrieField.toArr(time);
    if (indexed) ts = new NumericTokenStream(ps).setLongValue(time);

    Field f;
    if (stored) {
      f = new Field(field.getName(), arr, Field.Store.YES);
      if (indexed) f.setTokenStream(ts);
View Full Code Here

Examples of org.apache.lucene.analysis.NumericTokenStream

  protected final int precisionStep;
  protected final TrieTypes type;
  protected final NumericTokenStream ts;

  static NumericTokenStream getNumericTokenStream(int precisionStep) {
    return new NumericTokenStream(precisionStep);
  }
View Full Code Here

Examples of org.apache.lucene.analysis.NumericTokenStream

    if (!isIndexed())
      return null;
    if (numericTS == null) {
      // lazy init the TokenStream as it is heavy to instantiate (attributes,...),
      // if not needed (stored field loading)
      numericTS = new NumericTokenStream(precisionStep);
      // initialize value in TokenStream
      if (fieldsData != null) {
        assert type != null;
        final Number val = (Number) fieldsData;
        switch (type) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.