Class NumericFieldUtils

java.lang.Object
org.hibernate.search.bridge.util.NumericFieldUtils

public class NumericFieldUtils extends Object
Utility class to handle Numeric Fields
  • Constructor Details

    • NumericFieldUtils

      public NumericFieldUtils()
  • Method Details

    • createNumericRangeQuery

      public static Query createNumericRangeQuery(String fieldName, Object from, Object to, boolean includeLower, boolean includeUpper)
    • createExactMatchQuery

      public static Query createExactMatchQuery(String fieldName, Object value)
      Will create a RangeQuery matching exactly the provided value: lower and upper value match, and bounds are included. This should perform as efficiently as a TermQuery.
      Parameters:
      fieldName -
      value -
      Returns:
      the created Query
    • setNumericValue

      public static void setNumericValue(Object value, NumericField numericField)