elastic / elasticsearch

Free and Open, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
69.51k stars 24.6k forks source link

Remove Nysiis implementation from analyis-phonetic plugin #74821

Closed uschindler closed 3 years ago

uschindler commented 3 years ago

The analysis-phonetic plugin has a version of the Nysiis encode which was copypasted long ago from a prerelease (subversion trunk) of Apache Commons Codec.

This implementation is already included in commons-codec 1.11, so the Nysiis class should be removed and the factory adapted to use the version shipped with commons codec.

The copypaste of code is also a license violation, because the code, originating from commons-codec subversion repository, copyrighted by Apache Software Foundation, was relicensed to Elastic License

Here is the code: https://github.com/elastic/elasticsearch/blob/7.13/plugins/analysis-phonetic/src/main/java/org/elasticsearch/index/analysis/phonetic/Nysiis.java

Please note the comment that it was copied and see the ASF license here: https://github.com/apache/commons-codec/blob/b70e177f8733e9dd4e5f503620ed0b136b74785b/src/main/java/org/apache/commons/codec/language/Nysiis.java

spinscale commented 3 years ago

This has already been done in master https://github.com/elastic/elasticsearch/pull/65259

uschindler commented 3 years ago

Nevertheless the license in the 7.x branch has to be corrected. IMHO, this should be reported to Apache Legal mailing list.

uschindler commented 3 years ago

https://issues.apache.org/jira/browse/LEGAL-579

ywelsch commented 3 years ago

Thank you for raising this. I've opened #74830 as immediate action to backport #65259 to the relevant 7.x branches.

Edit: backports complete

elasticmachine commented 3 years ago

Pinging @elastic/es-search (Team:Search)

tomcallahan commented 3 years ago

I left a comment on the ASF legal issue; from my perspective we're good. We'll re-open if anything else comes up.