Interface MigrateBTreeIndexes
- All Superinterfaces:
Refactoring
Migrates existing B-tree indexes and constraints backed by such indexes to Neo4j 5.0+ and higher supported indexes.
By default, all B-tree indexes will be migrated to RANGE indexes, but this is configurable.
- Since:
- 1.13.0
- Author:
- Michael J. Simons
- Soundtrack
- Bobby Fletcher & Koljah - Vielleicht ist es besser so
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic MigrateBTreeIndexes
Prepares migration of old B-tree indexes to indexes supported in the future by creating RANGE indexes in parallel.static MigrateBTreeIndexes
createFutureIndexes
(String suffix) Prepares migration of old B-tree indexes to indexes supported in the future by creating RANGE indexes in parallel.static MigrateBTreeIndexes
Replaces all B-tree indexes and constraints backed with B-tree indexes with new Range indexes.withExcludes
(Collection<String> excludes) Creates a new refactoring that excludes the set of configured items during migration.withIncludes
(Collection<String> newIncludes) Configures an include list.withTypeMapping
(Map<String, Index.Type> typeMapping) Creates a new refactoring that uses the given type mapping.Methods inherited from interface ac.simons.neo4j.migrations.core.refactorings.Refactoring
apply
-
Field Details
-
LOGGER
Items that are not dropped will be logged through this logger. -
DEFAULT_SUFFIX
The default suffix for constraints and indexes that are bound to replace old btree based constraints and indexes. The suffix will only be needed when old constraints and indexes are kept around not dropped.- See Also:
-
-
Method Details
-
createFutureIndexes
Prepares migration of old B-tree indexes to indexes supported in the future by creating RANGE indexes in parallel. The new RANGE indexes will have the same name with the default suffix appended.- Returns:
- The refactoring ready to use
-
createFutureIndexes
Prepares migration of old B-tree indexes to indexes supported in the future by creating RANGE indexes in parallel. The new RANGE indexes will have the same name with the configured suffix appended.- Parameters:
suffix
- The suffix to use- Returns:
- The refactoring ready to use
-
replaceBTreeIndexes
Replaces all B-tree indexes and constraints backed with B-tree indexes with new Range indexes.- Returns:
- The refactoring ready to use
-
withTypeMapping
Creates a new refactoring that uses the given type mapping. An index that appears in the given list and is not an index backing a constraint will use the configured type instead.- Parameters:
typeMapping
- A map from name to type- Returns:
- The refactoring ready to use
-
withExcludes
Creates a new refactoring that excludes the set of configured items during migration.- Parameters:
excludes
- Indexes and constraints to ignore- Returns:
- The refactoring ready to use
-
withIncludes
Configures an include list. An empty or null value disables the include-list checking. A non empty list will configure the refactoring in such a way that only items that are on the list are migrated.- Parameters:
newIncludes
- New includes- Returns:
- The refactoring ready to use
-