public enum IndexSchemaManagementStrategy extends Enum<IndexSchemaManagementStrategy>
Enum Constant and Description |
---|
CREATE
Existing indexes will not be altered, missing indexes will be created along with their mappings and analyzer definitions.
|
MERGE
Upon session factory initialization, index mappings and analyzer definitions will be merged with existing ones,
causing an exception if a mapping to be merged is not compatible with the existing one.
|
NONE
Indexes will never be created or deleted.
|
RECREATE
Indexes - and all their contents - will be deleted and newly created (along with their mappings and analyzer definitions)
upon session factory initialization.
|
RECREATE_DELETE
The same as
RECREATE , but indexes - and all their contents - will be deleted upon session factory
shut-down as well. |
VALIDATE
Upon session factory initialization, existing index mappings will be checked
by Hibernate Search, causing an exception if a required mapping does not exist
or exists but differs in a non-compatible way (more strict type constraints, for instance),
or if an analyzer definition is missing or differs in any way.
|
Modifier and Type | Method and Description |
---|---|
static IndexSchemaManagementStrategy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static IndexSchemaManagementStrategy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final IndexSchemaManagementStrategy NONE
Hibernate Search will not even check that the index actually exists.
The index schema (mapping and analyzer definitions) is not managed by Hibernate Search and is not checked.
public static final IndexSchemaManagementStrategy VALIDATE
This strategy will not bring any change to the mappings or analyzer definitions, nor create or delete any index.
public static final IndexSchemaManagementStrategy MERGE
Missing indexes will be created along with their mappings and analyzer definitions. Missing mappings and analyzer definitions on existing indexes will be created.
public static final IndexSchemaManagementStrategy CREATE
public static final IndexSchemaManagementStrategy RECREATE
Note that whenever a search factory is altered after initialization (i.e. new entities are mapped), the index will not be deleted again: new mappings will simply be added to the index.
public static final IndexSchemaManagementStrategy RECREATE_DELETE
RECREATE
, but indexes - and all their contents - will be deleted upon session factory
shut-down as well.public static IndexSchemaManagementStrategy[] values()
for (IndexSchemaManagementStrategy c : IndexSchemaManagementStrategy.values()) System.out.println(c);
public static IndexSchemaManagementStrategy valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2006-2017 Red Hat, Inc. All Rights Reserved