Home > database >  How to install wikimedia extra plugin for elasticsearch?
How to install wikimedia extra plugin for elasticsearch?

Time:06-08

I am trying to install the org.mediawiki.search extra plugin for elasticsearch. I am running elasticsearch 7.17.2 locally, however the plugin seems to be available for elasticsearch 7.10.2 or older.

When I try to install it through the elasticsearch plugin installer, as suggested in the repository, I get

$ ./bin/elasticsearch-plugin install org.wikimedia.search:extra:7.17.2-wmf1
-> Installing org.wikimedia.search:extra:7.17.2-wmf1
-> Downloading org.wikimedia.search:extra:7.17.2-wmf1 from maven central
-> Failed installing org.wikimedia.search:extra:7.17.2-wmf1
-> Rolling back org.wikimedia.search:extra:7.17.2-wmf1
-> Rolled back org.wikimedia.search:extra:7.17.2-wmf1
Exception in thread "main" java.io.FileNotFoundException: https://repo1.maven.org/maven2/org/wikimedia/search/extra/7.17.2-wmf1/extra-7.17.2-wmf1.zip
    at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1993)
    at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1589)
    at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:224)
    at org.elasticsearch.plugins.cli.InstallPluginAction.downloadZip(InstallPluginAction.java:478)
    at org.elasticsearch.plugins.cli.InstallPluginAction.downloadAndValidate(InstallPluginAction.java:558)
    at org.elasticsearch.plugins.cli.InstallPluginAction.download(InstallPluginAction.java:328)
    at org.elasticsearch.plugins.cli.InstallPluginAction.execute(InstallPluginAction.java:242)
    at org.elasticsearch.plugins.cli.InstallPluginCommand.execute(InstallPluginCommand.java:88)
    at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:77)
    at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112)
    at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:95)
    at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112)
    at org.elasticsearch.cli.Command.main(Command.java:77)
    at org.elasticsearch.plugins.cli.PluginCli.main(PluginCli.java:36)

And if I specify the latest available version, I get

$ ./bin/elasticsearch-plugin install org.wikimedia.search:extra:7.10.2-wmf1
-> Installing org.wikimedia.search:extra:7.10.2-wmf1
-> Downloading org.wikimedia.search:extra:7.10.2-wmf1 from maven central
[=================================================] 100%   
Warning: sha512 not found, falling back to sha1. This behavior is deprecated and will be removed in a future release. Please update the plugin to use a sha512 checksum.
-> Failed installing org.wikimedia.search:extra:7.10.2-wmf1
-> Rolling back org.wikimedia.search:extra:7.10.2-wmf1
-> Rolled back org.wikimedia.search:extra:7.10.2-wmf1
Exception in thread "main" java.lang.IllegalArgumentException: Plugin [extra] was built for Elasticsearch version 7.10.2 but version 7.17.2 is running
    at org.elasticsearch.plugins.PluginsService.verifyCompatibility(PluginsService.java:391)
    at org.elasticsearch.plugins.cli.InstallPluginAction.loadPluginInfo(InstallPluginAction.java:831)
    at org.elasticsearch.plugins.cli.InstallPluginAction.installPlugin(InstallPluginAction.java:887)
    at org.elasticsearch.plugins.cli.InstallPluginAction.execute(InstallPluginAction.java:245)
    at org.elasticsearch.plugins.cli.InstallPluginCommand.execute(InstallPluginCommand.java:88)
    at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:77)
    at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112)
    at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:95)
    at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112)
    at org.elasticsearch.cli.Command.main(Command.java:77)
    at org.elasticsearch.plugins.cli.PluginCli.main(PluginCli.java:36)

Notice that, in the latter, it downloads the file but refuses to install it because of non-matching elasticsearch versions.

Does this mean that I just can't install the plugin for my specific version of elasticsearch? Do I need to downgrade to version 7.10.2 to use this plugin? Or perhaps I can download the appropriate version of the plugins from a different place?

Thanks in advance!

CodePudding user response:

Here, it says

You will have to release a new version of the plugin for each new elasticsearch release. This version is checked when the plugin is loaded so Elasticsearch will refuse to start in the presence of plugins with the incorrect elasticsearch.version.

So you need to find the plugin which is build for your elasticsearch version, and it looks like it doesn't exist, or you need downgrade your elasticsearch to your current plugin's version, which is 7.10.2.

  • Related