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.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringexternalRepresentation()static SchemaIdStrategyof(String value)static SchemaIdStrategyvalueOf(String name)Returns the enum constant of this type with the specified name.static SchemaIdStrategy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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. UseLUCENE_9instead. Note that switching toa new strategywill 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 Detail
-
values
public static SchemaIdStrategy[] 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 (SchemaIdStrategy c : SchemaIdStrategy.values()) System.out.println(c);
- 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 nameNullPointerException- if the argument is null
-
externalRepresentation
public String externalRepresentation()
- Returns:
- The expected string representation in configuration properties.
-
of
public static SchemaIdStrategy of(String value)
-
-