Package org.sindice.siren.analysis

Examples of org.sindice.siren.analysis.DoubleNumericAnalyzer


    final HashMap<ConfigurationKey, Object> config = new HashMap<ConfigurationKey, Object>();
    final Map<String, Analyzer> datatypes = new HashMap<String, Analyzer>();
    datatypes.put("int4", new IntNumericAnalyzer(4));
    datatypes.put("float4", new FloatNumericAnalyzer(4));
    datatypes.put("long4", new LongNumericAnalyzer(4));
    datatypes.put("double4", new DoubleNumericAnalyzer(4));
    config.put(KeywordConfigurationKeys.DATATYPES_ANALYZERS, datatypes);

    // Integer
    assertOpenRange(config, "int4");
    // Float
View Full Code Here


    // Set the datatype analyzers
    tupleAnalyzer.registerDatatype((XSDDatatype.XSD_LONG+"8").toCharArray(), new LongNumericAnalyzer(8));
    tupleAnalyzer.registerDatatype((XSDDatatype.XSD_LONG+"6").toCharArray(), new LongNumericAnalyzer(6));
    tupleAnalyzer.registerDatatype((XSDDatatype.XSD_LONG+"4").toCharArray(), new LongNumericAnalyzer(4));
    tupleAnalyzer.registerDatatype((XSDDatatype.XSD_LONG+"2").toCharArray(), new LongNumericAnalyzer(2));
    tupleAnalyzer.registerDatatype((XSDDatatype.XSD_DOUBLE+"8").toCharArray(), new DoubleNumericAnalyzer(8));
    tupleAnalyzer.registerDatatype((XSDDatatype.XSD_DOUBLE+"6").toCharArray(), new DoubleNumericAnalyzer(6));
    tupleAnalyzer.registerDatatype((XSDDatatype.XSD_DOUBLE+"4").toCharArray(), new DoubleNumericAnalyzer(4));
    tupleAnalyzer.registerDatatype((XSDDatatype.XSD_DOUBLE+"2").toCharArray(), new DoubleNumericAnalyzer(2));
    tupleAnalyzer.registerDatatype((XSDDatatype.XSD_LONG+Integer.MAX_VALUE).toCharArray(), new LongNumericAnalyzer(Integer.MAX_VALUE));

    index.directory = newDirectory();
    index.writer = newRandomIndexWriter(index.directory, tupleAnalyzer, codec);
  }
View Full Code Here

      case FLOAT:
        queryAnalyzer = analyzer = new FloatNumericAnalyzer(precisionStep);
        break;

      case DOUBLE:
        queryAnalyzer = analyzer = new DoubleNumericAnalyzer(precisionStep);
        break;

      case DATE:
        queryAnalyzer = analyzer = new DateNumericAnalyzer(precisionStep);
        break;
View Full Code Here

TOP

Related Classes of org.sindice.siren.analysis.DoubleNumericAnalyzer

Copyright © 2018 www.massapicom. 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.