org.hibernate.search.bridge

## Interface FieldBridge

- All Known Subinterfaces:
    MetadataProvidingFieldBridge, TwoWayFieldBridge
  All Known Implementing Classes:
    ArrayBridge, BuiltinArrayBridge, BuiltinIterableBridge, BuiltinMapBridge, DurationBridge, ElasticsearchCalendarBridge, ElasticsearchDateBridge, InstantBridge, IterableBridge, MapBridge, NullEncodingFieldBridge, NullEncodingTwoWayFieldBridge, NumericEncodingCalendarBridge, NumericEncodingDateBridge, NumericFieldBridge, SpatialFieldBridge, SpatialFieldBridgeByHash, SpatialFieldBridgeByRange, String2FieldBridgeAdaptor, StringEncodingCalendarBridge, StringEncodingDateBridge, TikaBridge, TwoWayString2FieldBridgeAdaptor, TwoWayString2FieldBridgeIgnoreAnalyzerAdaptor, YearBridge

      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

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `set(String name, Object value, Document document, LuceneOptions luceneOptions)` Manipulate the document to index the given value.

- - ### Method Detail

    - #### set

          void set(String name,
                   Object value,
                   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`.

           String fieldValue = convertToString(value);
           luceneOptions.addFieldToDocument(name, fieldValue, document);

      Parameters:
        `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-2017 Red Hat, Inc. All Rights Reserved