use of org.apache.lucene.queries.function.valuesource.DivFloatFunction in project lucene-solr by apache.
the class TestValueSources method testDiv.
public void testDiv() throws Exception {
ValueSource vs = new DivFloatFunction(new ConstValueSource(10f), new ConstValueSource(5f));
assertHits(new FunctionQuery(vs), new float[] { 2f, 2f });
assertAllExist(vs);
vs = new DivFloatFunction(new ConstValueSource(10f), BOGUS_FLOAT_VS);
assertNoneExist(vs);
vs = new DivFloatFunction(BOGUS_FLOAT_VS, new ConstValueSource(10f));
assertNoneExist(vs);
}
Aggregations