org.hibernate.search.bridge.util.impl
Class NumericFieldUtils
java.lang.Object
org.hibernate.search.bridge.util.impl.NumericFieldUtils
public class NumericFieldUtils
- extends Object
Utility class to handle Numeric Fields
- Author:
- Gustavo Fernandes
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NumericFieldUtils
public NumericFieldUtils()
createNumericRangeQuery
public static org.apache.lucene.search.Query createNumericRangeQuery(String fieldName,
Object from,
Object to,
boolean includeLower,
boolean includeUpper)
createExactMatchQuery
public static org.apache.lucene.search.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,
org.apache.lucene.document.NumericField numericField)
Copyright © 2006-2012 Red Hat Middleware, LLC. All Rights Reserved