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