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