Examples of DateNumericAnalyzer


Examples of org.sindice.siren.solr.analysis.DateNumericAnalyzer

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

      case DATE:
        queryAnalyzer = analyzer = new DateNumericAnalyzer(precisionStep);
        break;

      default:
        throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Unknown " +
            "type for trie datatype");
View Full Code Here

Examples of org.sindice.siren.solr.analysis.DateNumericAnalyzer

public class TestDateNumericAnalyzer {

  @Test
  public void testParser() throws IOException {
    final DateNumericAnalyzer analyzer = new DateNumericAnalyzer(8);
    final NumericParser parser = analyzer.getNumericParser();
    assertEquals(NumericType.LONG, parser.getNumericType());
    assertEquals(64, parser.getValueSize());
    final ReusableCharArrayReader input = new ReusableCharArrayReader("2012-09-21T00:00:00Z".toCharArray());
    assertEquals(1348185600000l, parser.parseAndConvert(input));
  }
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.