org.hibernate.search.bridge.spi

## Interface FieldMetadataCreationContext

- All Known Implementing Classes:
    Elasticsearch

      public interface FieldMetadataCreationContext

  Allows to configure field-related meta-data.
  Author:
    Gunnar Morling
  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
    --- | ---
    `FieldMetadataCreationContext` | `field(String name, FieldType type)` Adds a field to the list of all meta-data.
    `<T extends FieldMetadataCreationContext> T` | `mappedOn(Class<T> indexTechnology)` Gives access to properties that are specific to an indexing technology.
    `FieldMetadataCreationContext` | `sortable(boolean sortable)` Marks the last added field as sortable.

- - ### Method Detail

    - #### field

          FieldMetadataCreationContext field(String name,
                                             FieldType type)

      Adds a field to the list of all meta-data.
      Parameters:
        `name` - The name of the field
        `type` - The type of the field; The type of the field created in `FieldBridge.set(String, Object, org.apache.lucene.document.Document, org.hibernate.search.bridge.LuceneOptions)` must match the type declared for the field here.
      Returns:
        a context object for fluent API invocations

    - #### sortable

          FieldMetadataCreationContext sortable(boolean sortable)

      Marks the last added field as sortable.
      Parameters:
        `sortable` - whether the last added field is sortable or not.
      Returns:
        this context for fluent API invocations

    - #### mappedOn

          <T extends FieldMetadataCreationContext> T mappedOn(Class<T> indexTechnology)

      Gives access to properties that are specific to an indexing technology.
      Parameters:
        `indexTechnology` - the selected index technology.
      Returns:
        the context for the fluent API related to the select backend.

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