org.hibernate.search.bridge.spi

## Interface EncodingBridge

- All Known Implementing Classes:
    DurationBridge, ElasticsearchBooleanBridge, ElasticsearchCalendarBridge, ElasticsearchDateBridge, ElasticsearchInstantBridge, ElasticsearchLocalDateBridge, ElasticsearchLocalDateTimeBridge, ElasticsearchLocalTimeBridge, ElasticsearchMonthDayBridge, ElasticsearchOffsetDateTimeBridge, ElasticsearchOffsetTimeBridge, ElasticsearchTemporalAccessorStringBridge, ElasticsearchYearBridge, ElasticsearchYearMonthBridge, ElasticsearchZonedDateTimeBridge, EncodingStringBridge, InstantBridge, NumericEncodingCalendarBridge, NumericEncodingDateBridge, NumericFieldBridge, YearBridge

      public interface EncodingBridge

  Interface implemented by bridges that encode information in a specific format.

  Those bridges should:

  - declare the numeric encoding, if any, in order to expose it in the metadata
  - declare the null marker, in order to enable `Field.indexNullAs()`.

  Bridges that do not implement this interface will be attributed a `null` numeric encoding and fields with those bridges will use a simple null marker holding a string.

  Author:
    Yoann Rodiere
  Experimental
    This contract is currently under active development and may be altered in future releases, breaking existing users.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `NullMarker` | `createNullMarker(String indexNullAs)`
    `NumericFieldSettingsDescriptor.NumericEncodingType` | `getEncodingType()` Define the numeric encoding to use for the brdige.

- - ### Method Detail

    - #### getEncodingType

          NumericFieldSettingsDescriptor.NumericEncodingType getEncodingType()

      Define the numeric encoding to use for the brdige.
      Returns:
        the encoding to use for this bridge, or `NumericFieldSettingsDescriptor.NumericEncodingType.UNKNOWN` if this bridge does not use numeric encoding.

    - #### createNullMarker

          NullMarker createNullMarker(String indexNullAs)
                               throws IllegalArgumentException

      Parameters:
        `indexNullAs` - The value of `Field.indexNullAs()`.
      Returns:
        The marker to use when a value is missing.
      Throws:
        `IllegalArgumentException` - If `indexNullAs` cannot be encoded in the required format.

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