Migrate ElasticSearch 2.x groovy scripts straight to 6.x

We want to migrate straight from 2.x to 6.x. We cleaned up most of the deprecated queries based on (2.x -> 5.x) migration plugin. We don't use search features that removed in 5.x -> 6.x. The only thing remaining is our groovy scripts.

2.x doesn't have painless, 5.x introduced it and 6.x removed groovy. There is no intermediary script lang that we could use.

Is there a way to migrate scripts from 2.x -> 5.x?

Most groovy scripts should just work in painless, as both are based on java, and added features over java of painless were based on groovy. I recommend running a 1 node cluster and copying over your groovy scripts, tweaking them until they compile, and then running them with some sample data to ensure they still produce the same expected results.

Thank you for the response.

Our plan is to create a new cluster and gradually move all features one by one by switching connections. We'll do some scripts testing in the cluster with sample data (same as you suggested), then replace all the scripts at the same time when we switch the connections.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.