use of org.apache.solr.client.solrj.io.eval.StreamEvaluator in project lucene-solr by apache.
the class MultiplyEvaluatorTest method multTwoFieldWithNulls.
@Test
public void multTwoFieldWithNulls() throws Exception {
StreamEvaluator evaluator = factory.constructEvaluator("mult(a,b)");
Object result;
values.clear();
result = evaluator.evaluate(new Tuple(values));
Assert.assertNull(result);
}
use of org.apache.solr.client.solrj.io.eval.StreamEvaluator in project lucene-solr by apache.
the class NaturalLogEvaluatorTest method logNullValue.
@Test
public void logNullValue() throws Exception {
StreamEvaluator evaluator = factory.constructEvaluator("log(a)");
values.clear();
values.put("a", null);
Object result = evaluator.evaluate(new Tuple(values));
assertNull(result);
}
use of org.apache.solr.client.solrj.io.eval.StreamEvaluator in project lucene-solr by apache.
the class NaturalLogEvaluatorTest method logNoValue.
@Test
public void logNoValue() throws Exception {
StreamEvaluator evaluator = factory.constructEvaluator("log(a)");
values.clear();
Object result = evaluator.evaluate(new Tuple(values));
assertNull(result);
}
use of org.apache.solr.client.solrj.io.eval.StreamEvaluator in project lucene-solr by apache.
the class GreaterThanEqualToEvaluatorTest method gteDifferentTypes3.
@Test(expected = IOException.class)
public void gteDifferentTypes3() throws Exception {
StreamEvaluator evaluator = factory.constructEvaluator("gte(a,b)");
values.clear();
values.put("a", "1");
values.put("b", 1);
evaluator.evaluate(new Tuple(values));
}
use of org.apache.solr.client.solrj.io.eval.StreamEvaluator in project lucene-solr by apache.
the class GreaterThanEqualToEvaluatorTest method gteTwoBooleans.
@Test(expected = IOException.class)
public void gteTwoBooleans() throws Exception {
StreamEvaluator evaluator = factory.constructEvaluator("gte(a,b)");
values.clear();
values.put("a", true);
values.put("b", true);
evaluator.evaluate(new Tuple(values));
}
Aggregations