Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for specifying reindexing script for system index migration #119001

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

alexey-ivanov-es
Copy link
Contributor

@alexey-ivanov-es alexey-ivanov-es commented Dec 18, 2024

Adds support for setting a reindexing script for system index migration during /_migration/system_features task.
Script is set using SystemIndexDescriptor.Builder.setMigrationScript method.

Changes in this PR will be backported to 8.x branch

Adds support for setting a reindexing script
for system index migration during /_migration/system_features task.
Script is set using SystemIndexDescriptor.Builder.setMigrationScript method
@@ -282,6 +282,16 @@ public class Watcher extends Plugin implements SystemIndexPlugin, ScriptPlugin,
* to these old nodes that the mappings are newer than they are.
*/
private static final String LEGACY_VERSION_FIELD_VALUE = "8.12.0";

private static final String REINDEX_SCRIPT_FROM_V7 = """
Copy link
Contributor Author

@alexey-ivanov-es alexey-ivanov-es Dec 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change here is only to illustrate approach. I'll revert it later and create a separate PR for 8.x branch after all other changes is backported there. The script will only be in 8.18, not in 9.0

@alexey-ivanov-es
Copy link
Contributor Author

Verified manually 7.0.1 (-> 7.17.0) -> 8.18:
POST http://localhost:9200/_migration/system_features:

{
    "accepted": true,
    "features": [
        {
            "feature_name": "geoip"
        },
        {
            "feature_name": "watcher"
        }
    ]
}

types field was removed from the document created in v7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants