org.hibernate.search.bridge.builtin
public class MapBridge extends Object implements FieldBridge
null included) of the values in a Map is indexed using the specified FieldBridge.
null array is not indexed.| Constructor and Description |
|---|
MapBridge(FieldBridge bridge) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
indexEntry(String fieldName,
Object entry,
Document document,
LuceneOptions luceneOptions) |
protected void |
indexNotNullMap(String name,
Object value,
Document document,
LuceneOptions luceneOptions) |
void |
set(String fieldName,
Object value,
Document document,
LuceneOptions luceneOptions)
Manipulate the document to index the given value.
|
public MapBridge(FieldBridge bridge)
bridge - the FieldBridge used for each entry of a Map object.public void set(String fieldName, Object value, Document document, LuceneOptions luceneOptions)
FieldBridgename to document following
the parameters luceneOptions if the value is not null.
{code}
String fieldValue = convertToString(value);
luceneOptions.addFieldToDocument(name, fieldValue, document);
{code}set in interface FieldBridgefieldName - 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.protected void indexNotNullMap(String name, Object value, Document document, LuceneOptions luceneOptions)
protected void indexEntry(String fieldName, Object entry, Document document, LuceneOptions luceneOptions)
Copyright © 2006-2015 Red Hat, Inc. All Rights Reserved