Package org.hibernate.search.bridge
Interface FieldBridge
- All Known Subinterfaces:
TwoWayFieldBridge
- All Known Implementing Classes:
ContextualException2WayBridge,ContextualExceptionBridge,DoubleNumericFieldBridge,FloatNumericFieldBridge,IntegerNumericFieldBridge,LongNumericFieldBridge,NullEncodingTwoWayFieldBridge,NumericFieldBridge,String2FieldBridgeAdaptor,TwoWayString2FieldBridgeAdaptor
public interface FieldBridge
Link between a java property and a Lucene Document
Usually a Java property will be linked to a Document Field.
All implementations need to be threadsafe.
-
Method Summary
Modifier and TypeMethodDescriptionvoidset(String name, Object value, Document document, LuceneOptions luceneOptions) Manipulate the document to index the given value.
-
Method Details
-
set
Manipulate 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}- 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.
-