Class ArrayBridge

  extended by
All Implemented Interfaces:
Direct Known Subclasses:

public class ArrayBridge
extends Object
implements FieldBridge

Each entry (null included) of an array is indexed using the specified FieldBridge.
A null array is not indexed.

Davide D'Alto

Constructor Summary
ArrayBridge(FieldBridge bridge)
Method Summary
 void set(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, wait

Constructor Detail


public ArrayBridge(FieldBridge bridge)
bridge - the FieldBridge used for each entry of the array
Method Detail


public void set(String name,
                Object value,
                Document document,
                LuceneOptions luceneOptions)
Description copied from interface: FieldBridge
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}

Specified by:
set in interface FieldBridge
name - The field to add to the Lucene document
value - The actual value to index
document - 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-2013 Red Hat, Inc. All Rights Reserved