Enum Index

java.lang.Object
java.lang.Enum<Index>
org.hibernate.search.annotations.Index
All Implemented Interfaces:
Serializable, Comparable<Index>, java.lang.constant.Constable

public enum Index extends Enum<Index>
Defines how an Field should be indexed
  • Enum Constant Details

    • NO

      public static final Index NO
      Do not index the field value. This field can thus not be searched, but one can still access its contents provided it is stored.
    • TOKENIZED

      public static final Index TOKENIZED
      Index the field's value so it can be searched. An Analyzer will be used to tokenize and possibly further normalize the text before its terms will be stored in the index. This is useful for common text.
    • UN_TOKENIZED

      public static final Index UN_TOKENIZED
      Index the field's value without using an Analyzer, so it can be searched. As no analyzer is used the value will be stored as a single term. This is useful for unique Ids like product numbers.
    • NO_NORMS

      public static final Index NO_NORMS
      Index the field's value without an Analyzer, and disable the storing of norms. No norms means that index-time boosting and field length normalization will be disabled. The benefit is less memory usage as norms take up one byte per indexed field for every document in the index.
  • Method Details

    • values

      public static Index[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Index 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