duydo/elasticsearch-analysis-vietnamese

Build Fail in ES 7.4.2?

hanzigs opened this issue · 1 comments

Can i have some help?

[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ elasticsearch-analysis-vietnamese ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ elasticsearch-analysis-vietnamese ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 5 source files to C:\viet-plugin\vn-nlp-libraries\nlp-parent\elasticsearch-analysis-vietnamese\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /C:/viet-plugin/vn-nlp-libraries/nlp-parent/elasticsearch-analysis-vietnamese/src/main/java/org/elasticsearch/index/analysis/VietnameseTokenizerFactory.java:[33,9] constructor AbstractTokenizerFactory in class org.elasticsearch.index.analysis.AbstractTokenizerFactory cannot be applied to given types;
required: org.elasticsearch.index.IndexSettings,org.elasticsearch.common.settings.Settings,java.lang.String
found: org.elasticsearch.index.IndexSettings,org.elasticsearch.common.settings.Settings
reason: actual and formal argument lists differ in length
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 33.403 s
[INFO] Finished at: 2019-12-23T13:46:19+11:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project elasticsearch-analysis-vietnamese: Compilation failure
[ERROR] /C:/viet-plugin/vn-nlp-libraries/nlp-parent/elasticsearch-analysis-vietnamese/src/main/java/org/elasticsearch/index/analysis/VietnameseTokenizerFactory.java:[33,9] constructor AbstractTokenizerFactory in class org.elasticsearch.index.analysis.AbstractTokenizerFactory cannot be applied to given types;
[ERROR] required: org.elasticsearch.index.IndexSettings,org.elasticsearch.common.settings.Settings,java.lang.String
[ERROR] found: org.elasticsearch.index.IndexSettings,org.elasticsearch.common.settings.Settings
[ERROR] reason: actual and formal argument lists differ in length
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Following steps as per https://duydo.me/how-to-build-elasticsearch-vietnamese-analysis-plugin/

This worked
public VietnameseTokenizerFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) {
super(indexSettings, settings, name);
tokenizer = AccessController.doPrivileged((PrivilegedAction<me.duydo.vi.Tokenizer>) () -> new me.duydo.vi.Tokenizer());
}