The BTREE index type cannot get migrated to 5.0 on-the-fly. This image and most of all the new support of migrating indexes in Neo4j-Migrations provides a one-liner to migrate your dumps from BTREE to RANGE indexes.
The tool will convert all BTREE indexes to RANGE type. It does not check if this is a POINT or other type of index. :underage: You might only use it if you know what you are doing. :open_hands: This is for your from the community for the community. I am happy to get your input if this helps you (or you have questions). But this Dockerfile is completely unofficial and unrelated to Neo4j.
From your Neo4j installation directory:
bin/neo4j stop
mkdir migration
bin/neo4j-admin dump --database=neo4j --to=migration/neo4j-with-btrees.dump
git clone git@github.com:meistermeier/migrate-to-neo4j-50.git migration/util
docker build -t neo4j-5.0-migration:1.0 migration/util
cat migration/neo4j-with-btrees.dump | docker run --rm -i neo4j-5.0-migration:1.0 > migration/neo4j-with-ranges.dump
bin/neo4j-admin load --force --database=neo4j --from=migration/neo4j-with-ranges.dump
bin/neo4j start
./bin/cypher-shell -u neo4j -p secret 'SHOW INDEXES'
These steps:
- Create a migration director
- Dump your
neo4j
database - Clone this utility
- Build the container image locally
- Run and uses it
- Restores the database again
- Starts the server and shows that indexes are now of type `RANGE
Read more about neo4j-admin and Offline Backup, read more about neo4j-migrations here.
If you need to, you can use the enterprise edition of Neo4j by providing --build-arg EDITION="-enterprise"
during the image build.
By doing this, you accept the licencing of Neo4j enterprise edition.