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

langdetect REST endpoint & test fixes for 5.3.3 #37

Open
edudev opened this issue Nov 7, 2018 · 0 comments
Open

langdetect REST endpoint & test fixes for 5.3.3 #37

edudev opened this issue Nov 7, 2018 · 0 comments

Comments

@edudev
Copy link

edudev commented Nov 7, 2018

I've forked this project and fixed some issues: https://github.com/edudev/elasticsearch-plugin-bundle/tree/5.3

The fixes are as follows:

  • FstDecompounder::createGlueMorphemes made changes to the passed parameter, which may be FstDecompounder::morphemes. This results in the morphemes sometimes being [e, n, ne, re, s, se, sn, sne] and sometimes being [e, en, ens, er, es, n, ns, s]. Making changes to a passed parameter is mostly not a good idea so my change simply works with a copy of this glue string array;
  • The documentation for the langdetect REST API was incorrect. The API was changed when the plugin was updated to 5.3.0, but no changes were made to the docs;
  • With the update to 5.3.0 the ActionResponse::toXContent method was updated accordingly, but the changes were not reflected in LangdetectResponse::toXContent;
  • With the update to 5.3.0 endpoints for /_isbn/{value} and /_langdetect/{profile} were added, but they simply can't be reached. If a request is made to one of them, Elasticsearch simple treats _isbn or _langdetect as an index;
  • I've added tests for the above bugfixes - the tests pass with my changes but fail without them;

I've applied the above fixes for Elasticsearch 5.3.3, but don't have the resources (time) to apply these bugfixes to the other versions, nor do I know if other versions are affected by these bugs.
I can't submit a pull request as there is no branch for version 5.3.X of the plugin. My changes are on top of tag 5.3.1.0.

P.S. I'd be glad to make a pull request if @jprante can make a 5.3 branch of tag 5.3.1.0.

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

No branches or pull requests

1 participant