Enum ReindexOnUpdate
- java.lang.Object
-
- java.lang.Enum<ReindexOnUpdate>
-
- org.hibernate.search.mapper.pojo.automaticindexing.ReindexOnUpdate
-
- All Implemented Interfaces:
Serializable,Comparable<ReindexOnUpdate>
public enum ReindexOnUpdate extends Enum<ReindexOnUpdate>
Defines the various strategies for handling updates to a value in an entity.A "value" here means either an entity property or something extracted from that property using a
ContainerExtractor.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DEFAULTApply the default, safe behavior: If a parent value was assignedNO, ignore an updates to this value. Otherwise, track updates to this value, or any nested value, but only if they are used in the indexing process.NOIgnore updates to the values (or to any nested value) and as a consequence never trigger reindexing, unless an indexed entity is deleted or another, sibling value configured withDEFAULTis updated.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ReindexOnUpdatevalueOf(String name)Returns the enum constant of this type with the specified name.static ReindexOnUpdate[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DEFAULT
public static final ReindexOnUpdate DEFAULT
Apply the default, safe behavior:- If a parent value was assigned
NO, ignore an updates to this value. -
Otherwise, track updates to this value, or any nested value,
but only if they are used in the indexing process.
Whenever an update is detected, trigger reindexing of the entity holding the updated value,
and of any other entity accessing this value through an
IndexedEmbeddedfor example.
Note that updates to nested values that were assigned
NOwill always be ignored. - If a parent value was assigned
-
NO
public static final ReindexOnUpdate NO
Ignore updates to the values (or to any nested value) and as a consequence never trigger reindexing, unless an indexed entity is deleted or another, sibling value configured withDEFAULTis updated.This generally means indexing should be triggered externally to periodically refresh the index.
-
-
Method Detail
-
values
public static ReindexOnUpdate[] 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 (ReindexOnUpdate c : ReindexOnUpdate.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ReindexOnUpdate 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
-
-