org.hibernate.search.metadata.impl

## Class FieldDescriptorImpl

- java.lang.Object
- - org.hibernate.search.metadata.impl.FieldDescriptorImpl

- All Implemented Interfaces:
    FieldDescriptor, FieldSettingsDescriptor
  Direct Known Subclasses:
    NumericFieldDescriptorImpl

      public class FieldDescriptorImpl
      extends Object
      implements FieldDescriptor

  Author:
    Hardy Ferentschik

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.hibernate.search.metadata.FieldSettingsDescriptor

      `FieldSettingsDescriptor.Type`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FieldDescriptorImpl(DocumentFieldMetadata documentFieldMetadata)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T extends FieldSettingsDescriptor> T` | `as(Class<T> type)` Narrows the type of this descriptor down to the specified `type`.
    `Analyze` | `getAnalyze()`
    `Analyzer` | `getAnalyzer()`
    `float` | `getBoost()`
    `FieldBridge` | `getFieldBridge()`
    `Index` | `getIndex()`
    `String` | `getName()` Returns the Lucene `Document` field name for this indexed property.
    `Norms` | `getNorms()`
    `Store` | `getStore()`
    `TermVector` | `getTermVector()`
    `FieldSettingsDescriptor.Type` | `getType()`
    `boolean` | `indexNull()`
    `String` | `indexNullAs()`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### FieldDescriptorImpl

          public FieldDescriptorImpl(DocumentFieldMetadata documentFieldMetadata)

  - ### Method Detail

    - #### getName

          public String getName()

      Description copied from interface: `FieldSettingsDescriptor`
      Returns the Lucene `Document` field name for this indexed property.
      Specified by:
        `getName` in interface `FieldSettingsDescriptor`
      Returns:
        Returns the field name for this index property

    - #### getIndex

          public Index getIndex()

      Specified by:
        `getIndex` in interface `FieldSettingsDescriptor`
      Returns:
        an `Index` enum instance defining whether this field is indexed

    - #### getAnalyze

          public Analyze getAnalyze()

      Specified by:
        `getAnalyze` in interface `FieldSettingsDescriptor`
      Returns:
        an `Analyze` enum instance defining the type of analyzing applied to this field

    - #### getStore

          public Store getStore()

      Specified by:
        `getStore` in interface `FieldSettingsDescriptor`
      Returns:
        a `Store` enum instance defining whether the index value is stored in the index itself

    - #### getTermVector

          public TermVector getTermVector()

      Specified by:
        `getTermVector` in interface `FieldSettingsDescriptor`
      Returns:
        a `TermVector` enum instance defining whether and how term vectors are stored for this field

    - #### getNorms

          public Norms getNorms()

      Specified by:
        `getNorms` in interface `FieldSettingsDescriptor`
      Returns:
        a `Norms` enum instance defining whether and how norms are stored for this field

    - #### getBoost

          public float getBoost()

      Specified by:
        `getBoost` in interface `FieldSettingsDescriptor`
      Returns:
        the boost value for this field. 1 being the default value.

    - #### getType

          public FieldSettingsDescriptor.Type getType()

      Specified by:
        `getType` in interface `FieldSettingsDescriptor`
      Returns:
        `Type` of this field

    - #### as

          public <T extends FieldSettingsDescriptor> T as(Class<T> type)

      Description copied from interface: `FieldSettingsDescriptor`
      Narrows the type of this descriptor down to the specified `type`. The appropriate type should be checked beforehand by calling `FieldSettingsDescriptor.getType()`.
      Specified by:
        `as` in interface `FieldSettingsDescriptor`
      Type Parameters:
        `T` - the type to narrow down to
      Parameters:
        `type` - class object representing the descriptor type to narrow down to to
      Returns:
        this descriptor narrowed down to the given type.

    - #### indexNullAs

          public String indexNullAs()

      Specified by:
        `indexNullAs` in interface `FieldDescriptor`
      Returns:
        the string used to index `null` values. `null` in case null values are not indexed

    - #### indexNull

          public boolean indexNull()

      Specified by:
        `indexNull` in interface `FieldDescriptor`
      Returns:
        `true` if `null` values are indexed, `false` otherwise
      See Also:
        `FieldDescriptor.indexNullAs()`

    - #### getFieldBridge

          public FieldBridge getFieldBridge()

      Specified by:
        `getFieldBridge` in interface `FieldDescriptor`
      Returns:
        the field bridge instance used to convert the property value into a string based field value

    - #### getAnalyzer

          public Analyzer getAnalyzer()

      Specified by:
        `getAnalyzer` in interface `FieldDescriptor`
      Returns:
        the analyzer used for this field, `null` if the field is not analyzed

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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