use of org.apache.lucene.queries.function.valuesource.ScaleFloatFunction in project lucene-solr by apache.
the class TestValueSources method testScale.
public void testScale() throws Exception {
ValueSource vs = new ScaleFloatFunction(new IntFieldSource("int"), 0, 1);
assertHits(new FunctionQuery(vs), new float[] { 0.0f, 1.0f });
assertAllExist(vs);
vs = new ScaleFloatFunction(BOGUS_INT_VS, 0, 1);
assertNoneExist(vs);
}
Aggregations