Class NumericFieldBridge
java.lang.Object
org.hibernate.search.bridge.builtin.NumericFieldBridge
- All Implemented Interfaces:
FieldBridge,TwoWayFieldBridge
- Direct Known Subclasses:
DoubleNumericFieldBridge,FloatNumericFieldBridge,IntegerNumericFieldBridge,LongNumericFieldBridge
Bridge to index numeric values using a Trie structure (multiple terms representing different precisions)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionobjectToString(Object object) Convert the object representation to a string.voidset(String name, Object value, Document document, LuceneOptions luceneOptions) Manipulate the document to index the given value.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.search.bridge.TwoWayFieldBridge
get
-
Constructor Details
-
NumericFieldBridge
public NumericFieldBridge()
-
-
Method Details
-
set
Description copied from interface:FieldBridgeManipulate the document to index the given value. A common implementation is to add a Field with the givennametodocumentfollowing the parametersluceneOptionsif thevalueis notnull. {code} String fieldValue = convertToString(value); luceneOptions.addFieldToDocument(name, fieldValue, document); {code}- Specified by:
setin interfaceFieldBridge- Parameters:
name- The field to add to the Lucene documentvalue- The actual value to indexdocument- The Lucene document into which we want to index the value.luceneOptions- Contains the parameters used for addingvalueto the Lucene document.
-
objectToString
Description copied from interface:TwoWayFieldBridgeConvert the object representation to a string.- Specified by:
objectToStringin interfaceTwoWayFieldBridge- Parameters:
object- The object to index.- Returns:
- string (index) representation of the specified object. Must not be
null, but can be empty.
-