This is an automated email from the ASF dual-hosted git repository. fgerthoffert pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/unomi.git
The following commit(s) were added to refs/heads/master by this push: new 10135bf6c [UNOMI-669] Added more details on sequencing for the migration in the docs (#504) 10135bf6c is described below commit 10135bf6c587c5728830876fc110f569ba600466 Author: Francois G <fgerthoff...@jahia.com> AuthorDate: Wed Sep 21 09:16:54 2022 +0200 [UNOMI-669] Added more details on sequencing for the migration in the docs (#504) --- manual/src/main/asciidoc/migrations/migrate-1.6-to-2.0.adoc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/manual/src/main/asciidoc/migrations/migrate-1.6-to-2.0.adoc b/manual/src/main/asciidoc/migrations/migrate-1.6-to-2.0.adoc index 926026147..15133a229 100644 --- a/manual/src/main/asciidoc/migrations/migrate-1.6-to-2.0.adoc +++ b/manual/src/main/asciidoc/migrations/migrate-1.6-to-2.0.adoc @@ -70,6 +70,14 @@ these scripts are sorted alphabetically and executed sequentially when migration In most cases, migration steps consist of an Elasticsearch painless script that will handle the data changes. +Depending of the volume of data, migration can be lengthy. By paying attention to when re-indexation is happening (triggered in the groovy scripts by `MigrationUtils.reIndex()`), +you can find the most appropriate time for your scritps to be executed and avoid re-indexing the same indices multiple times. + +For example if you wanted to update profiles with custom data (currently migrated by `migrate-2.0.0-10-profileReindex.groovy`), you could create a script in position "09" that would only contain painless scripts without a reindexing step. +The script in position "10" will introduce its own painless script, then trigger the re-indexation. This way you don't have to re-index the same indices twice. + +You can find existing painless scripts in https://github.com/apache/unomi/tree/master/tools/shell-commands/src/main/resources/requestBody/2.0.0[tools/shell-commands/src/main/resources/requestBody/2.0.0] + At runtime, and when starting the migration, Unomi 2.0 will take its own scripts, any additional scripts located in `data/migration/scripts`, will sort the resulting list alphabetically and execute each migration script sequentially. ==== Perform the migration @@ -159,6 +167,7 @@ At the end of the migration, you can start Unomi 2.0 as usual using: `unomi:star The migration can also be performed using Docker images, the migration itself can be started by passing a specific value to the `KARAF_OPTS` environment variable. In the context of this migration guide, we will asssume that: + - Custom migration scripts are located in `/home/unomi/migration/scripts/` - Painless scripts, or more generally any migration assets are located in `/home/unomi/migration/assets/`, these scripts will be mounted under `/tmp/assets/` inside the Docker container.