Enum SchemaIdStrategy

java.lang.Object
java.lang.Enum<SchemaIdStrategy>
org.hibernate.search.backend.lucene.schema.SchemaIdStrategy
All Implemented Interfaces:
Serializable, Comparable<SchemaIdStrategy>

public enum SchemaIdStrategy extends Enum<SchemaIdStrategy>
Strategy that defines how to read/write IDs to/from a document.
  • Enum Constant Details

    • LUCENE_8

      @Deprecated public static final SchemaIdStrategy LUCENE_8
      Deprecated.
      It will be removed in a future version of Hibernate Search that will support Lucene 9. Use LUCENE_9 instead. Note that switching to a new strategy will require indexes to be recreated and repopulated.
      Currently used strategy that is compatible with the current and indexes from previous Hibernate Search versions.
    • LUCENE_9

      public static final SchemaIdStrategy LUCENE_9
      This strategy will create documents compatible with future versions of Hibernate Search. Switching to this strategy for existing applications will require indexes to be recreated and repopulated.
  • Method Details

    • values

      public static SchemaIdStrategy[] 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 SchemaIdStrategy 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
    • externalRepresentation

      public String externalRepresentation()
      Returns:
      The expected string representation in configuration properties.
    • of

      public static SchemaIdStrategy of(String value)