use of org.apache.solr.client.solrj.io.eval.TemporalEvaluatorDay in project lucene-solr by apache.
the class TemporalEvaluatorsTest method testExplain.
@Test
public void testExplain() throws IOException {
StreamExpression express = StreamExpressionParser.parse("month('myfield')");
TemporalEvaluatorMonth datePartEvaluator = new TemporalEvaluatorMonth(express, factory);
Explanation explain = datePartEvaluator.toExplanation(factory);
assertEquals("month(myfield)", explain.getExpression());
express = StreamExpressionParser.parse("day(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbb)");
TemporalEvaluatorDay dayPartEvaluator = new TemporalEvaluatorDay(express, factory);
explain = dayPartEvaluator.toExplanation(factory);
assertEquals("day(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbb)", explain.getExpression());
}
Aggregations