org.hibernate.search.bridge

## Interface MetadataProvidingFieldBridge

- All Superinterfaces:
    FieldBridge
  All Known Implementing Classes:
    SpatialFieldBridge, SpatialFieldBridgeByHash, SpatialFieldBridgeByRange, TikaBridge

      public interface MetadataProvidingFieldBridge
      extends FieldBridge

  Optional contract to be implemented by `FieldBridge` implementations wishing to expose meta-data related to the fields they create.

  Field bridges should implement this contract if they create field(s) with custom names and wish them to mark as sortable. The required doc value fields will be added by the Hibernate Search engine in that case. Otherwise users may not (efficiently) sort on such custom fields.

  Author:
    Gunnar Morling
  Experimental
    This contract is currently under active development and may be altered in future releases, breaking existing implementations.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `configureFieldMetadata(String name, FieldMetadataBuilder builder)` Allows this bridge to expose meta-data about the fields it creates.

    - ### Methods inherited from interface org.hibernate.search.bridge.FieldBridge

      `set`

- - ### Method Detail

    - #### configureFieldMetadata

          void configureFieldMetadata(String name,
                                      FieldMetadataBuilder builder)

      Allows this bridge to expose meta-data about the fields it creates.
      Parameters:
        `name` - The default field name; Should be used consistently with `FieldBridge.set(String, Object, org.apache.lucene.document.Document, LuceneOptions)`.
        `builder` - Builder for exposing field-related meta-data

Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved