Backwards compatibility and stability. Painless is amazing but it isn't finished. I mean, no software is finished, but painless is getting a lot of new features so it is moving fast. Like, it just got support negative array indexes meaning "index from the back". That is technically a backwards compatibility breaking feature, but one that folks have asked for even before it was released. We will be adding lots of things to painless during the 5.0 release.
Seems a bit hasty to deprecate groovy in 5.0 when it supports negative array indexes since years, while painless, the "preferred" solution, does not. This can scare people off.
It is super hasty but I'm fairly convinced it is the right thing to do. Painless is changing a lot and is nowhere near documented enough but groovy is insecure and slow. The security part worries me a lot because just having it on the classpath has caused vulnerabilities in the past. And the sandbox is worthless so turning on dynamic scripting is fraught. But people do it because dynamic scripting is awesome and flexible and powerful and great.
So we got here: painless is the new default because you can use it in dynamic scripting safely. And if we discover a vulnerability with painless we'll fix it immediately. Groovy is available for anyone that needs the stability that it offers but we all look at it sideways because it has a lean and hungry look.
I see that there are reasons for and against the groovy library. But let me ask: Why first install this module, and then warn people that this is deprecated? It's a bit irritating for users who just installed elasticsearch, see the warning and wonder what they did wrong.
I totally agree with @Suny, just installed elastic search and am trying it out but this was the first thing I saw which now makes me confused right off the bat! It would be nice to have something welcoming rather than a warning about deprecated packages. But you can put that message somewhere else and if it's important enough, you might as well just use it and warn people that this is not as stable as the deprecated package but you're on it ... so something to look forward not worry and know that we need to change it at some point.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.