# Plugin installation on local ElasticSearch

**URL:** <https://discuss.elastic.co/t/plugin-installation-on-local-elasticsearch/270729>\
**Category:** Elasticsearch\
**Created:** [April 20, 2021, 2:24pm UTC](https://discuss.elastic.co/t/plugin-installation-on-local-elasticsearch/270729 "2021-04-20T14:24:57Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lukas\_Smilek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_smilek/32/87425_2.png) [@Lukas\_Smilek](https://discuss.elastic.co/u/Lukas_Smilek)\
**Post date:** [April 20, 2021, 2:24pm UTC](https://discuss.elastic.co/t/plugin-installation-on-local-elasticsearch/270729/1 "2021-04-20T14:24:57Z")

</div>

Hello, I was able to successfully install ElasticSearch 7.12.0 on my Mac and also work with it (mapping and indexing first objects via non local network). I want to install a plugin, but I can't get pass this error:

```
***-Mac-mini:elasticsearch-7.12.0*** $ sudo bin/elasticsearch-plugin install https://github.com/mvSapphire/skiplist-elastic-plugin/blob/master/target/releases/searchFilter-plugin-7.2.0-SNAPSHOT.zip?raw=true 
Password: ******
-> Installing https://github.com/mvSapphire/skiplist-elastic-plugin/blob/master/target/releases/searchFilter-plugin-7.2.0-SNAPSHOT.zip?raw=true
-> Downloading https://github.com/mvSapphire/skiplist-elastic-plugin/blob/master/target/releases/searchFilter-plugin-7.2.0-SNAPSHOT.zip?raw=true
[=================================================] 100%
-> Failed installing https://github.com/mvSapphire/skiplist-elastic-plugin/blob/master/target/releases/searchFilter-plugin-7.2.0-SNAPSHOT.zip?raw=true
-> Rolling back https://github.com/mvSapphire/skiplist-elastic-plugin/blob/master/target/releases/searchFilter-plugin-7.2.0-SNAPSHOT.zip?raw=true
-> Rolled back https://github.com/mvSapphire/skiplist-elastic-plugin/blob/master/target/releases/searchFilter-plugin-7.2.0-SNAPSHOT.zip?raw=true
Exception in thread "main" java.nio.file.NoSuchFileException: /Users/lukassmilek/Downloads/elasticsearch-7.12.0/plugins/.installing-7959574728750973093/plugin-descriptor.properties
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:218)
at java.base/java.nio.file.Files.newByteChannel(Files.java:375)
at java.base/java.nio.file.Files.newByteChannel(Files.java:426)
at java.base/java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:420)
at java.base/java.nio.file.Files.newInputStream(Files.java:160)
at org.elasticsearch.plugins.PluginInfo.readFromProperties(PluginInfo.java:173)
at org.elasticsearch.plugins.InstallPluginCommand.loadPluginInfo(InstallPluginCommand.java:786)
at org.elasticsearch.plugins.InstallPluginCommand.installPlugin(InstallPluginCommand.java:845)
at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:245)
at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:215)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:75)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:116)
at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:80)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:116)
at org.elasticsearch.cli.Command.main(Command.java:79)
at org.elasticsearch.plugins.PluginCli.main(PluginCli.java:36) 

```

Is there anything else I have to install beside ElasticSearch? I tried few different plugins, but it behaves the same.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 20, 2021, 2:37pm UTC](https://discuss.elastic.co/t/plugin-installation-on-local-elasticsearch/270729/2 "2021-04-20T14:37:22Z")

</div>

I don't really know but according to the documentation ([GitHub - mvSapphire/skiplist-elastic-plugin: Plugin for elastic (7.2.0) to skip large lists of \_ids](https://github.com/mvSapphire/skiplist-elastic-plugin)) this plugin has not been updated and released for 7.2.0.

You should ask the author IMO.

---

<div class="post-metadata">

**Author:** ![Lukas\_Smilek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_smilek/32/87425_2.png) [@Lukas\_Smilek](https://discuss.elastic.co/u/Lukas_Smilek)\
**Post date:** [April 21, 2021, 8:34am UTC](https://discuss.elastic.co/t/plugin-installation-on-local-elasticsearch/270729/3 "2021-04-21T08:34:49Z")

</div>

I believe it is only compiling of the plugin as the plugin itself is a short and simple. Is there any guide how to build your own plugin from scratch for users that do come from totally different industry and do not know much about programming?

What I found is:  
[medium article](https://ocampor.medium.com/development-environment-set-up-for-a-custom-elasticsearch-plugin-266c0df6bbdd)  
[elastic.co help, not very helpful](https://www.elastic.co/guide/en/elasticsearch/plugins/7.12/plugin-authors.html)  
and some outdated posts...

I installed Visual Studio Code and tried to follow the Medium article above, but I hit following error on `gradle assemble`

Failed to apply plugin class 'org.elasticsearch.gradle.info.GlobalBuildInfoPlugin'.

> Could not create plugin of type 'GlobalBuildInfoPlugin'.  
> Could not generate a decorated class for type GlobalBuildInfoPlugin.  
> org/gradle/jvm/toolchain/internal/SharedJavaInstallationRegistry

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 21, 2021, 8:49am UTC](https://discuss.elastic.co/t/plugin-installation-on-local-elasticsearch/270729/4 "2021-04-21T08:49:05Z")

</div>

I'm afraid I can't help on that.

I just pinged the author of the updated version of the plugin in the issue you opened.

Could you also explain what you are trying to achieve with this plugin? So someone from the search team could may find a workaround or an existing way for doing it?

---

<div class="post-metadata">

**Author:** ![Lukas\_Smilek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_smilek/32/87425_2.png) [@Lukas\_Smilek](https://discuss.elastic.co/u/Lukas_Smilek)\
**Post date:** [April 21, 2021, 9:52am UTC](https://discuss.elastic.co/t/plugin-installation-on-local-elasticsearch/270729/5 "2021-04-21T09:52:55Z")

</div>

I know there is terms lookup function that can be used as a skip list in the ElasticSearch. This would require that the index gets updated very often to have an actual skip list available. The idea is basically what the above mentioned plugin does. [original plugin](https://github.com/jrots/skiplist-elastic-plugin)

with help of [RoaringBitmap](https://github.com/lemire/RoaringBitmap/) I would like to pass an base64 string to the query script that would exclude documents that has a certain Integer value in a field XY

this will allow to pass the skip list effectively to query and have the actual state in the main MongoDB database always up to date

---

<div class="post-metadata">

**Author:** ![Lukas\_Smilek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_smilek/32/87425_2.png) [@Lukas\_Smilek](https://discuss.elastic.co/u/Lukas_Smilek)\
**Post date:** [April 21, 2021, 12:22pm UTC](https://discuss.elastic.co/t/plugin-installation-on-local-elasticsearch/270729/6 "2021-04-21T12:22:37Z")

</div>

I was able to compile it by my own with Intelli Idea right now, followings the steps [here](https://codeburst.io/how-to-make-a-rest-handlers-elasticsearch-plugin-from-scratch-50829e7382d5)

but it still throws the same during installation. Therefore I think it is nothing related to the plugin itself, but setup of the paths and elasticsearch. Perhaps you would have any idea?

I added to my `.bash_profile` following, but without any difference:

```
export ES_HOME=/Users/lukassmilek/Downloads/elasticsearch-7.12.0
export ES_JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-16.0.1.jdk/Contents/Home
export PATH=$ES_HOME/bin:$ES_JAVA_HOME/bin:$PATH

```

is there anything else like permissions or something to setup? I installed elasticsearch by extracting the file in above mentioned folder.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 21, 2021, 2:28pm UTC](https://discuss.elastic.co/t/plugin-installation-on-local-elasticsearch/270729/7 "2021-04-21T14:28:11Z")

</div>

may be @MarkVieira could help for the gradle part?

> [@Lukas\_Smilek](#):
>
> with help of [RoaringBitmap](https://github.com/lemire/RoaringBitmap/) I would like to pass an base64 string to the query script that would exclude documents that has a certain Integer value in a field XY

Why not using a simple `bool` query with a `must_not` clause which contains the integer you want to exclude from the results? Would that work for you?

---

<div class="post-metadata">

**Author:** ![Lukas\_Smilek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_smilek/32/87425_2.png) [@Lukas\_Smilek](https://discuss.elastic.co/u/Lukas_Smilek)\
**Post date:** [April 21, 2021, 2:43pm UTC](https://discuss.elastic.co/t/plugin-installation-on-local-elasticsearch/270729/8 "2021-04-21T14:43:33Z")

</div>

Such `must_not` would have to check against array of 10000+ integers for some users. I think it would be also heavy traffic in that case.

I managed now to "somehow" compile it in a way that it got installed. I am not sure what I did though. I think that **provided** made a difference in the `pom.xml` file

```
   <dependency>
        <groupId>org.elasticsearch</groupId>
        <artifactId>elasticsearch</artifactId>
        <version>${elasticsearch.version}</version>
        <scope>provided</scope>
    </dependency>

```

I'll share the feedback if it works or not. 🙂

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 21, 2021, 3:43pm UTC](https://discuss.elastic.co/t/plugin-installation-on-local-elasticsearch/270729/9 "2021-04-21T15:43:33Z")

</div>

> [@Lukas\_Smilek](#):
>
> Such `must_not` would have to check against array of 10000+ integers for some users.

I see.

Just to be sure we are not missing anything, could you share some typical documents you have today and what would be a request like with the plugin and with the `must_not` way?

---

<div class="post-metadata">

**Author:** ![MarkVieira](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markvieira/32/45333_2.png) [@MarkVieira](https://discuss.elastic.co/u/MarkVieira)\
**Post date:** [April 21, 2021, 4:12pm UTC](https://discuss.elastic.co/t/plugin-installation-on-local-elasticsearch/270729/10 "2021-04-21T16:12:16Z")

</div>

Regarding the Gradle build error you see, that's a Gradle version incompatibility. Looks like you're using Gradle 7.0 but the version of the plugin you're using requires Gradle 6.8.

---

<div class="post-metadata">

**Author:** ![Lukas\_Smilek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_smilek/32/87425_2.png) [@Lukas\_Smilek](https://discuss.elastic.co/u/Lukas_Smilek)\
**Post date:** [April 22, 2021, 7:55am UTC](https://discuss.elastic.co/t/plugin-installation-on-local-elasticsearch/270729/11 "2021-04-22T07:55:13Z")

</div>

the simplest implementation would be as following:

```
{
    "query": {
        "function_score": {
	        "min_score" : 0.1,
            "query": {
               "match_all": {}
            },
            "script_score" : {
                "script" : {
                  "lang" : "skiplist",
                  "source" : "roaring",
                  "params" : {
                      "field" : "bf",
                      "data" : "OjAAAAEAAAAAAAAAEAAAAAoA"
                  }
                }
            }
        }
    }
}

```

the base64 string is RoaringBitmap with only one integer set ("10") and the min\_score 0.1 exclude all documents that has this Integer 10 in the "bf" field.

It seems to work as intended when I tried it yesterday. I will try to perform some testing on thousands of dummy data today. I think the problem was combination of the `.bash_profile` setting with `provided` in dependency, but I am not 100% sure.

> [@MarkVieira](#):
>
> Regarding the Gradle build error you see, that's a Gradle version incompatibility. Looks like you're using Gradle 7.0 but the version of the plugin you're using requires Gradle 6.8.

I ended up compiling it with Intelli J Idea as this was a bit simpler for a no-experience guy like me. But you must be correct, the VS Code added second Gradle as I probably missed versioning in the code.

Thank you, highly appreciated your help!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 20, 2021, 7:56am UTC](https://discuss.elastic.co/t/plugin-installation-on-local-elasticsearch/270729/12 "2021-05-20T07:56:04Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
