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 impact that an update to a value in an entity will have on automatic indexing.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 DEFAULT
Default behavior: updates to the targeted value will trigger automatic reindexing if it's actually used in the indexing process of an indexed entity, unless a property on the path from the indexed entity to the targeted value prevents it through a differentReindexOnUpdate
setting.NO
Updates to the targeted value, or to any "nested" value (values that are accessed through the targeted value), will never trigger automatic reindexing.SHALLOW
Updates to the targeted value will trigger automatic reindexing if it's actually used in the indexing process of an indexed entity, unless a property on the path from the indexed entity to the targeted value prevents it through a differentReindexOnUpdate
setting.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ReindexOnUpdate
valueOf(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
Default behavior: updates to the targeted value will trigger automatic reindexing if it's actually used in the indexing process of an indexed entity, unless a property on the path from the indexed entity to the targeted value prevents it through a differentReindexOnUpdate
setting.To be precise:
- If an indexed entity accesses the targeted value indirectly (e.g. through an
@IndexedEmbedded
), and a property in the path from the indexed entity to the targeted value was assignedNO
, then updates to the targeted value will not automatically trigger reindexing of the indexed entity. - If an indexed entity
A
accesses the targeted value indirectly (e.g. through an@IndexedEmbedded
), and a property in the path from the indexed entity to the targeted value was assignedSHALLOW
, and the targeted value is owned by a different entityB
, then updates to the targeted value will not automatically trigger reindexing of the indexed entityA
. - Otherwise, assuming the targeted value is actually used in the indexing process of an indexed entity,
either directly (e.g.
@GenericField
) or indirectly (e.g. through@IndexedEmbedded
), then updates to the targeted value will automatically trigger reindexing of the indexed entity.
- If an indexed entity accesses the targeted value indirectly (e.g. through an
-
SHALLOW
public static final ReindexOnUpdate SHALLOW
Updates to the targeted value will trigger automatic reindexing if it's actually used in the indexing process of an indexed entity, unless a property on the path from the indexed entity to the targeted value prevents it through a differentReindexOnUpdate
setting.However, updates to "nested" values (values that are accessed through the targeted value) will only trigger automatic reindexing if the "nested" value is owned by the same entity as the targeted value. When the path from the targeted value to the "nested" values crosses entity boundaries, the reindex-on-update behavior automatically switches to
NO
.Applications relying on this setting should have periodic batch processes in place to refresh the index of affected entities in case "nested" values changed.
-
NO
public static final ReindexOnUpdate NO
Updates to the targeted value, or to any "nested" value (values that are accessed through the targeted value), will never trigger automatic reindexing.Applications relying on this setting should have periodic batch processes in place to refresh the index of affected entities in case the targeted value changed.
-
-
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
-
-