org.hibernate.search.bridge.spi

## Enum FieldType

- java.lang.Object
- - java.lang.Enum<FieldType>
  - - org.hibernate.search.bridge.spi.FieldType

- All Implemented Interfaces:
    Serializable, Comparable<FieldType>

      public enum FieldType
      extends Enum<FieldType>

  The type of an indexed field.
  Author:
    Gunnar Morling
  Experimental
    This contract is currently under active development and may be altered in future releases, breaking existing users.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `BOOLEAN` A boolean field, mapped to the String "true" or "false" in Lucene.
    `DATE` A date, mapped to a long in Lucene, corresponding to the number of milliseconds from Epoch.
    `DOUBLE` A double field.
    `FLOAT` A float field.
    `INTEGER` An integer field.
    `LONG` A long field.
    `OBJECT` A composite object that will benefit from using a different encoding on each indexing technology.
    `STRING` A String field.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static FieldType` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static FieldType[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### STRING

          public static final FieldType STRING

      A String field.

    - #### BOOLEAN

          public static final FieldType BOOLEAN

      A boolean field, mapped to the String "true" or "false" in Lucene.

    - #### DATE

          public static final FieldType DATE

      A date, mapped to a long in Lucene, corresponding to the number of milliseconds from Epoch.

    - #### INTEGER

          public static final FieldType INTEGER

      An integer field.

    - #### LONG

          public static final FieldType LONG

      A long field.

    - #### FLOAT

          public static final FieldType FLOAT

      A float field.

    - #### DOUBLE

          public static final FieldType DOUBLE

      A double field.

    - #### OBJECT

          public static final FieldType OBJECT

      A composite object that will benefit from using a different encoding on each indexing technology.

      For example, it could identify a field that should be mapped in Elasticsearch as an inner object and in Lucene as multiple string fields (Lucene does not have inner objects).

  - ### Method Detail

    - #### values

          public static FieldType[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (FieldType c : FieldType.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static FieldType valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

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