Class HibernateOrmMapperSettings
- java.lang.Object
-
- org.hibernate.search.mapper.orm.cfg.HibernateOrmMapperSettings
-
public final class HibernateOrmMapperSettings extends Object
- Author:
- Emmanuel Bernard, Hardy Ferentschik
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHibernateOrmMapperSettings.AutomaticIndexingRadicalsConfiguration property keys without theprefix+HibernateOrmMapperSettings.Radicals.AUTOMATIC_INDEXING_PREFIX.static classHibernateOrmMapperSettings.CoordinationRadicalsConfiguration property keys without theprefix+HibernateOrmMapperSettings.Radicals.COORDINATION_PREFIX.static classHibernateOrmMapperSettings.DefaultsDefault values for the different settings if no values are given.static classHibernateOrmMapperSettings.RadicalsConfiguration property keys without theprefix.
-
Field Summary
Fields Modifier and Type Field Description static StringAUTOMATIC_INDEXING_ENABLE_DIRTY_CHECKWhether to check if dirty properties are relevant to indexing before actually reindexing an entity.static StringAUTOMATIC_INDEXING_ENABLEDWhether automatic indexing is enabled, i.e.static StringAUTOMATIC_INDEXING_STRATEGYDeprecated.UseAUTOMATIC_INDEXING_ENABLEDinstead (caution: it expects a boolean value).static StringAUTOMATIC_INDEXING_SYNCHRONIZATION_STRATEGYThe synchronization strategy to use when indexing automatically.static StringCOORDINATION_PROCESSORS_INDEXING_BATCH_SIZEIn the background indexing processor, how many outbox events, at most, are processed in a single transaction.static StringCOORDINATION_PROCESSORS_INDEXING_ENABLEDWhether the application will process entity change events.static StringCOORDINATION_PROCESSORS_INDEXING_POLLING_INTERVALIn the background indexing processor, how long to wait for another query to the outbox events table after a query didn't return any event, in milliseconds.static StringCOORDINATION_SHARDS_ASSIGNEDThe indices of shards assigned to this application node.static StringCOORDINATION_SHARDS_STATICWhether shards are static, i.e.static StringCOORDINATION_SHARDS_TOTAL_COUNTThe total number of shards across all application nodes.static StringCOORDINATION_STRATEGYThe strategy for coordinating between nodes of a distributed application.static StringENABLEDWhether Hibernate Search is enabled or not.static StringMAPPING_CONFIGURERThe mapping configurer to use.static StringMAPPING_PROCESS_ANNOTATIONSWhether annotations should be automatically processed for entity types, as well as nested types in those entity types, for instance embedded types.static StringPREFIXThe prefix expected for the key of every Hibernate Search configuration property when using the Hibernate ORM mapper.static StringQUERY_LOADING_CACHE_LOOKUP_STRATEGYThe strategy to use when loading entities during the execution of a search query.static StringQUERY_LOADING_FETCH_SIZEThe fetch size to use when loading entities during the execution of a search query.static StringSCHEMA_MANAGEMENT_STRATEGYThe schema management strategy, controlling how indexes and their schema are created, updated, validated or dropped on startup and shutdown.
-
-
-
Field Detail
-
PREFIX
public static final String PREFIX
The prefix expected for the key of every Hibernate Search configuration property when using the Hibernate ORM mapper.- See Also:
- Constant Field Values
-
ENABLED
public static final String ENABLED
Whether Hibernate Search is enabled or not.Expects a Boolean value such as
trueorfalse, or a string that can be parsed to such Boolean value.Defaults to
HibernateOrmMapperSettings.Defaults.ENABLED.- See Also:
- Constant Field Values
-
AUTOMATIC_INDEXING_ENABLED
public static final String AUTOMATIC_INDEXING_ENABLED
Whether automatic indexing is enabled, i.e. whether changes to entities in a Hibernate ORM session are detected automatically and lead to reindexing.Expects a Boolean value such as
trueorfalse, or a string that can be parsed to such Boolean value.Defaults to
HibernateOrmMapperSettings.Defaults.AUTOMATIC_INDEXING_ENABLED.- See Also:
- Constant Field Values
-
AUTOMATIC_INDEXING_STRATEGY
@Deprecated public static final String AUTOMATIC_INDEXING_STRATEGY
Deprecated.UseAUTOMATIC_INDEXING_ENABLEDinstead (caution: it expects a boolean value).The automatic indexing strategy to use.Expects a
AutomaticIndexingStrategyNamevalue, or a String representation of such value.Defaults to
HibernateOrmMapperSettings.Defaults.AUTOMATIC_INDEXING_STRATEGY.- See Also:
CoordinationStrategyNames, Constant Field Values
-
AUTOMATIC_INDEXING_SYNCHRONIZATION_STRATEGY
public static final String AUTOMATIC_INDEXING_SYNCHRONIZATION_STRATEGY
The synchronization strategy to use when indexing automatically.Expects one of the strings defined in
AutomaticIndexingSynchronizationStrategyNames, or a reference to a bean of typeAutomaticIndexingSynchronizationStrategy.Defaults to
HibernateOrmMapperSettings.Defaults.AUTOMATIC_INDEXING_SYNCHRONIZATION_STRATEGY.
-
AUTOMATIC_INDEXING_ENABLE_DIRTY_CHECK
public static final String AUTOMATIC_INDEXING_ENABLE_DIRTY_CHECK
Whether to check if dirty properties are relevant to indexing before actually reindexing an entity.When enabled, re-indexing of an entity is skipped if the only changes are on properties that are not used when indexing. This feature is considered safe and thus enabled by default.
Expects a Boolean value such as
trueorfalse, or a string that can be parsed to such Boolean value.Defaults to
Defaults#AUTOMATIC_INDEXING_ENABLE_DIRTY_CHECK.- See Also:
- Constant Field Values
-
QUERY_LOADING_CACHE_LOOKUP_STRATEGY
public static final String QUERY_LOADING_CACHE_LOOKUP_STRATEGY
The strategy to use when loading entities during the execution of a search query.Expects a
EntityLoadingCacheLookupStrategyvalue, or a String representation of such value.Defaults to
HibernateOrmMapperSettings.Defaults.QUERY_LOADING_CACHE_LOOKUP_STRATEGY.
-
QUERY_LOADING_FETCH_SIZE
public static final String QUERY_LOADING_FETCH_SIZE
The fetch size to use when loading entities during the execution of a search query.Expects a strictly positive Integer value, such as
100, or a String that can be parsed into such Integer value.Defaults to
HibernateOrmMapperSettings.Defaults.QUERY_LOADING_FETCH_SIZE.- See Also:
- Constant Field Values
-
MAPPING_PROCESS_ANNOTATIONS
public static final String MAPPING_PROCESS_ANNOTATIONS
Whether annotations should be automatically processed for entity types, as well as nested types in those entity types, for instance embedded types.Expects a Boolean value such as
trueorfalse, or a string that can be parsed to such Boolean value.Defaults to
Defaults#ENABLE_ANNOTATION_MAPPING.- See Also:
- Constant Field Values
-
MAPPING_CONFIGURER
public static final String MAPPING_CONFIGURER
The mapping configurer to use.Expects a reference to a bean of type
HibernateOrmSearchMappingConfigurer.Defaults to no value.
-
SCHEMA_MANAGEMENT_STRATEGY
public static final String SCHEMA_MANAGEMENT_STRATEGY
The schema management strategy, controlling how indexes and their schema are created, updated, validated or dropped on startup and shutdown.Expects a
SchemaManagementStrategyNamevalue, or a String representation of such value.Defaults to
HibernateOrmMapperSettings.Defaults.SCHEMA_MANAGEMENT_STRATEGY.
-
COORDINATION_STRATEGY
public static final String COORDINATION_STRATEGY
The strategy for coordinating between nodes of a distributed application.Expects one of the strings defined in
CoordinationStrategyNames, or a different string for a strategy provided by an external module.Defaults to
HibernateOrmMapperSettings.Defaults.COORDINATION_STRATEGY.- See Also:
CoordinationStrategyNames, Constant Field Values
-
COORDINATION_SHARDS_STATIC
public static final String COORDINATION_SHARDS_STATIC
Whether shards are static, i.e. configured explicitly for each node, with a fixed number of shards/nodes.WARNING: This property must have the same value for all application nodes, and must never change unless all application nodes are stopped, then restarted. Failing that, some events may not be processed or may be processed twice or in the wrong order, resulting in errors and/or out-of-sync indexes.
Only available when
COORDINATION_STRATEGYisCoordinationStrategyNames.DATABASE_POLLING.Expects a Boolean value such as
trueorfalse, or a string that can be parsed to such Boolean value.Defaults to
HibernateOrmMapperSettings.Defaults.COORDINATION_SHARDS_STATIC.- See Also:
- Constant Field Values
-
COORDINATION_SHARDS_TOTAL_COUNT
public static final String COORDINATION_SHARDS_TOTAL_COUNT
The total number of shards across all application nodes.WARNING: This property must have the same value for all application nodes, and must never change unless all application nodes are stopped, then restarted. Failing that, some events may not be processed or may be processed twice or in the wrong order, resulting in errors and/or out-of-sync indexes.
Only available when
COORDINATION_STRATEGYisCoordinationStrategyNames.DATABASE_POLLINGandCOORDINATION_SHARDS_STATICistrue.Expects an Integer value of at least
2, or a String that can be parsed into such Integer value.No default: must be provided when static sharding is enabled.
- See Also:
- Constant Field Values
-
COORDINATION_SHARDS_ASSIGNED
public static final String COORDINATION_SHARDS_ASSIGNED
The indices of shards assigned to this application node.WARNING: shards must be uniquely assigned to one and only one application nodes. Failing that, some events may not be processed or may be processed twice or in the wrong order, resulting in errors and/or out-of-sync indexes.
Only available when
AUTOMATIC_INDEXING_STRATEGYisCoordinationStrategyNames.DATABASE_POLLINGandCOORDINATION_SHARDS_STATICistrue.Expects a shard index, i.e. an Integer value between
0(inclusive) and thetotal shard count(exclusive), or a String that can be parsed into such shard index, or a String containing multiple such shard index strings separated by commas, or aCollection<Integer>containing such shard indices.No default: must be provided when static sharding is enabled.
- See Also:
- Constant Field Values
-
COORDINATION_PROCESSORS_INDEXING_ENABLED
public static final String COORDINATION_PROCESSORS_INDEXING_ENABLED
Whether the application will process entity change events.Only available when
COORDINATION_STRATEGYisCoordinationStrategyNames.DATABASE_POLLING.Expects a Boolean value such as
trueorfalse, or a string that can be parsed to such Boolean value.Defaults to
HibernateOrmMapperSettings.Defaults.COORDINATION_PROCESSORS_INDEXING_ENABLED.When processing is disabled, events will still be produced by this application node whenever an entity changes, but indexing will not happen on this application node and is assumed to happen on another node.
- See Also:
- Constant Field Values
-
COORDINATION_PROCESSORS_INDEXING_POLLING_INTERVAL
public static final String COORDINATION_PROCESSORS_INDEXING_POLLING_INTERVAL
In the background indexing processor, how long to wait for another query to the outbox events table after a query didn't return any event, in milliseconds.Only available when
COORDINATION_STRATEGYisCoordinationStrategyNames.DATABASE_POLLING.Hibernate Search will wait that long before polling again if the last polling didn't return any event:
- High values mean higher latency between DB changes and indexing, but less stress on the database when there are no events to process.
- Low values mean lower latency between DB changes and indexing, but more stress on the database when there are no events to process.
Expects a positive Integer value in milliseconds, such as
1000, or a String that can be parsed into such Integer value.Defaults to
HibernateOrmMapperSettings.Defaults.COORDINATION_PROCESSORS_INDEXING_POLLING_INTERVAL.- See Also:
- Constant Field Values
-
COORDINATION_PROCESSORS_INDEXING_BATCH_SIZE
public static final String COORDINATION_PROCESSORS_INDEXING_BATCH_SIZE
In the background indexing processor, how many outbox events, at most, are processed in a single transaction.Only available when
COORDINATION_STRATEGYisCoordinationStrategyNames.DATABASE_POLLING.Expects a positive Integer value, such as
50, or a String that can be parsed into such Integer value.Defaults to
HibernateOrmMapperSettings.Defaults.COORDINATION_PROCESSORS_INDEXING_BATCH_SIZE.- See Also:
- Constant Field Values
-
-