Class FunctionRangeQuery


  • public class FunctionRangeQuery
    extends Query
    A Query wrapping a ValueSource that matches docs in which the values in the value source match a configured range. The score is the float value. This can be a slow query if run by itself since it must visit all docs; ideally it's combined with other queries. It's mostly a wrapper around FunctionValues.getRangeScorer(LeafReaderContext, String, String, boolean, boolean). A similar class is org.apache.lucene.search.DocValuesRangeQuery in the sandbox module. That one is constant scoring.
    See Also:
    (constant scoring)
    WARNING: This API is experimental and might change in incompatible ways in the next release.
    • Constructor Detail

      • FunctionRangeQuery

        public FunctionRangeQuery​(ValueSource valueSource,
                                  Number lowerVal,
                                  Number upperVal,
                                  boolean includeLower,
                                  boolean includeUpper)
      • FunctionRangeQuery

        public FunctionRangeQuery​(ValueSource valueSource,
                                  String lowerVal,
                                  String upperVal,
                                  boolean includeLower,
                                  boolean includeUpper)