Example usage for org.apache.solr.search.function ValueSourceRangeFilter getUpperVal

List of usage examples for org.apache.solr.search.function ValueSourceRangeFilter getUpperVal

Introduction

In this page you can find the example usage for org.apache.solr.search.function ValueSourceRangeFilter getUpperVal.

Prototype

public String getUpperVal() 

Source Link

Usage

From source file:org.vootoo.search.CollectorFilterablePluginTest.java

License:Apache License

private void assertRange(String range, String min, String max, boolean incMin, boolean incMax, boolean error) {
    try {/*  w  ww  .j  a v  a  2s . c om*/
        ValueSourceRangeFilter vsrf = CollectorFilterablePlugin.parseRange(null, range);
        if (error) {
            Assert.fail("parse v=" + range + " ok, but need error");
        }
        Assert.assertNotNull(vsrf);
        Assert.assertEquals(vsrf.getLowerVal(), min);
        Assert.assertEquals(vsrf.getUpperVal(), max);
        Assert.assertEquals(vsrf.isIncludeLower(), incMin);
        Assert.assertEquals(vsrf.isIncludeUpper(), incMax);
    } catch (SyntaxError e) {
        if (!error) {
            Assert.fail("parse v=" + range + " error, " + e.getMessage());
        }
    }

}