org.hibernate.search.bridge
Interface FieldBridge
- All Known Subinterfaces:
- TwoWayFieldBridge
- All Known Implementing Classes:
- ArrayBridge, BuiltinArrayBridge, BuiltinIterableBridge, BuiltinMapBridge, BuiltinNumericArrayBridge, BuiltinNumericIterableBridge, BuiltinNumericMapBridge, DoubleNumericFieldBridge, FloatNumericFieldBridge, IntegerNumericFieldBridge, IterableBridge, LongNumericFieldBridge, MapBridge, NullEncodingFieldBridge, 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.
- Author:
- Emmanuel Bernard
Method Summary |
void |
set(String name,
Object value,
org.apache.lucene.document.Document document,
LuceneOptions luceneOptions)
Manipulate the document to index the given value. |
set
void set(String name,
Object value,
org.apache.lucene.document.Document document,
LuceneOptions luceneOptions)
- Manipulate the document to index the given value.
A common implementation is to add a Field with the given
name
to document
following
the parameters luceneOptions
if the value
is not null
.
{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 adding value
to
the Lucene document.
Copyright © 2006-2012 Red Hat Middleware, LLC. All Rights Reserved