public class IterableBridge extends Object implements FieldBridge, ContainerBridge
null included
) of an Iterable
object is indexed using the specified
FieldBridge
.
null
Iterable
object is not indexed.Constructor and Description |
---|
IterableBridge(FieldBridge bridge) |
Modifier and Type | Method and Description |
---|---|
FieldBridge |
getElementBridge() |
void |
set(String fieldName,
Object value,
Document document,
LuceneOptions luceneOptions)
Manipulate the document to index the given value.
|
public IterableBridge(FieldBridge bridge)
bridge
- the FieldBridge
used for each entry of the Iterable
object.public void set(String fieldName, Object value, Document document, LuceneOptions luceneOptions)
FieldBridge
name
to document
following
the parameters luceneOptions
if the value
is not null
.
String fieldValue = convertToString(value);
luceneOptions.addFieldToDocument(name, fieldValue, document);
set
in interface FieldBridge
fieldName
- 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.public FieldBridge getElementBridge()
getElementBridge
in interface ContainerBridge
Copyright © 2006-2015 Red Hat, Inc. All Rights Reserved