Cannot install plugin elasticsearch-analysis-morfologik

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
2.11.1

Describe the issue:
Cannot install plugin elasticsearch-analysis-morfologik or analysis-morfologik

Configuration:
/usr/share/opensearch/bin/opensearch-plugin install pl.allegro.tech.elasticsearch.plugin:elasticsearch-analysis-morfologik:8.9.0

Relevant Logs or Screenshots:

→ Installing pl.allegro.tech.elasticsearch.plugin:elasticsearch-analysis-morfologik:8.9.0
→ Downloading pl.allegro.tech.elasticsearch.plugin:elasticsearch-analysis-morfologik:8.9.0 from maven central
[=================================================] 100%??
→ Failed installing pl.allegro.tech.elasticsearch.plugin:elasticsearch-analysis-morfologik:8.9.0
→ Rolling back pl.allegro.tech.elasticsearch.plugin:elasticsearch-analysis-morfologik:8.9.0
→ Rolled back pl.allegro.tech.elasticsearch.plugin:elasticsearch-analysis-morfologik:8.9.0
Exception in thread “main” java.lang.IllegalArgumentException: property [opensearch.version] is missing for plugin [analysis-morfologik]

It seems that the file plugin-descriptor.properties of the plugin does not contain the property opensearch.version, you can check the file in the zip package of the plugin and rebuild a new zip package.

You have right this plugin-descriptor.file contains

classname=pl.allegro.tech.elasticsearch.plugin.analysis.morfologik.AnalysisMorfologikPlugin
name=analysis-morfologik
description=Morfologik Polish Lemmatizer plugin for Elasticsearch
version=8.9.0
java.version=17
elasticsearch.version=8.9.0

I remove line

elasticsearch.version=8.9.0

and add line with

opensearch.version=2.11.1

but this doesn’t help

org.opensearch.bootstrap.StartupException: OpenSearchException[Unable to load plugin class [pl.allegro.tech.elasticsearch.plugin.analysis.morfologik.AnalysisMorfologikPlugin]]; nested: NoClassDefFoundError[org/elasticsearch/plugins/AnalysisPlugin]; nested: ClassNotFoundException[org.elasticsearch.plugins.AnalysisPlugin];
        at org.opensearch.bootstrap.OpenSearch.init(OpenSearch.java:184) ~[opensearch-2.11.1.jar:2.11.1]
        at org.opensearch.bootstrap.OpenSearch.execute(OpenSearch.java:171) ~[opensearch-2.11.1.jar:2.11.1]
        at org.opensearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:104) ~[opensearch-2.11.1.jar:2.11.1]
        at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:138) ~[opensearch-cli-2.11.1.jar:2.11.1]
        at org.opensearch.cli.Command.main(Command.java:101) ~[opensearch-cli-2.11.1.jar:2.11.1]
        at org.opensearch.bootstrap.OpenSearch.main(OpenSearch.java:137) ~[opensearch-2.11.1.jar:2.11.1]
        at org.opensearch.bootstrap.OpenSearch.main(OpenSearch.java:103) ~[opensearch-2.11.1.jar:2.11.1]
Caused by: org.opensearch.OpenSearchException: Unable to load plugin class [pl.allegro.tech.elasticsearch.plugin.analysis.morfologik.AnalysisMorfologikPlugin]
        at org.opensearch.plugins.PluginsService.loadPluginClass(PluginsService.java:760) ~[opensearch-2.11.1.jar:2.11.1]
        at org.opensearch.plugins.PluginsService.loadBundle(PluginsService.java:719) ~[opensearch-2.11.1.jar:2.11.1]
        at org.opensearch.plugins.PluginsService.loadBundles(PluginsService.java:533) ~[opensearch-2.11.1.jar:2.11.1]
        at org.opensearch.plugins.PluginsService.<init>(PluginsService.java:195) ~[opensearch-2.11.1.jar:2.11.1]
        at org.opensearch.node.Node.<init>(Node.java:480) ~[opensearch-2.11.1.jar:2.11.1]
        at org.opensearch.node.Node.<init>(Node.java:407) ~[opensearch-2.11.1.jar:2.11.1]
        at org.opensearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:242) ~[opensearch-2.11.1.jar:2.11.1]
        at org.opensearch.bootstrap.Bootstrap.setup(Bootstrap.java:242) ~[opensearch-2.11.1.jar:2.11.1]
        at org.opensearch.bootstrap.Bootstrap.init(Bootstrap.java:404) ~[opensearch-2.11.1.jar:2.11.1]
        at org.opensearch.bootstrap.OpenSearch.init(OpenSearch.java:180) ~[opensearch-2.11.1.jar:2.11.1]
        ... 6 more

When i install this plugin to elasticSearch, everything is fine. But when i want install to oppensearch there is a problem. I’m new in opensearch and maybe it’s not possible install
elasticsearch-analysis-morfologik to openSearch :frowning:

@pawel I think this issue might be related to the fact that AnalysisPlugin class exists in org.opensearch.plugins.AnalysisPlugin

I’ve made a plugin for OpenSearch 2.11.1. It’s in alpha stage but working.
https://github.com/Ksawierek/opensearch-analysis-morfologik/releases/download/2.11.1/opensearch-analysis-morfologik-2.11.1.zip

Thanks @ksawierek. Works great :slight_smile: