Interface MigrateBTreeIndexes

All Superinterfaces:
Refactoring

public interface MigrateBTreeIndexes extends 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 Details

    • LOGGER

      static final Logger LOGGER
      Items that are not dropped will be logged through this logger.
    • DEFAULT_SUFFIX

      static final String 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

      static MigrateBTreeIndexes 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

      static MigrateBTreeIndexes createFutureIndexes(String suffix)
      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

      static MigrateBTreeIndexes replaceBTreeIndexes()
      Replaces all B-tree indexes and constraints backed with B-tree indexes with new Range indexes.
      Returns:
      The refactoring ready to use
    • withTypeMapping

      MigrateBTreeIndexes withTypeMapping(Map<String,Index.Type> typeMapping)
      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

      MigrateBTreeIndexes withExcludes(Collection<String> excludes)
      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

      MigrateBTreeIndexes withIncludes(Collection<String> newIncludes)
      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