I tried to install elasticsearch-image plugin from https://github.com/kzwang/elasticsearch-image by typing the commands
bin/plugin -install com.github.kzwang/elasticsearch-image/1.2.0
sudo service elasticsearch restart
And when I tried to index images and search for them I've got this Exception
{"error":"MapperParsingException[failed to parse]; nested: NoSuchMethodError[org.elasticsearch.common.io.stream.BytesStreamInput.<init>([BZ)V]; ","status":400}
When I checked for this exception I found an issue here that talks about this exception. https://github.com/kzwang/elasticsearch-image/issues/20
As I searched more, I found that the reason why this exception is appearing is because the class org.elasticsearch.common.io.stream.BytesStreamInput
implementation differs between ElasticSearch 1.3.2 AND ElasticSearch 1.7.2
The plugin is built for ElasticSearch 1.3.2, and it uses the class BytesStreamInput
in those lines
Which all uses the constructor defined in ElasticSearch 1.3.2
But in ElasticSearch 1.7.2 that constructor is removed and replaced by
So what I did is forking the project
https://github.com/abozanona/elasticsearch-image
and removing the second parameter to be like in lines
https://github.com/abozanona/elasticsearch-image/blob/master/src/main/java/org/elasticsearch/index/mapper/image/ImageMapper.java#L258
https://github.com/abozanona/elasticsearch-image/blob/master/src/main/java/org/elasticsearch/index/mapper/image/ImageMapper.java#L344
https://github.com/abozanona/elasticsearch-image/blob/master/src/main/java/org/elasticsearch/index/query/image/ImageQueryParser.java#L117
Then tried to install the plugin from the forked project
I tried to use this command
sudo /usr/share/elasticsearch/bin/plugin --install com.github.abozanona.elasticsearch-image/1.2.1
But it gives me this error
Failed to install com.github.abozanona.elasticsearch-image/1.2.1, reason: failed to download out of all possible locations
I tried also to run this command
sudo ./plugin --install readonlyrest --url 'https://github.com/abozanona/elasticsearch-image/archive/1.2.1.zip?raw=true'
OR
sudo ./plugin -install abozanona/elasticsearch-image
But it gives me this error
Error while installing plugin, reason: IllegalArgumentException: Plugin installation assumed to be site plugin, but contains source code, aborting installation.
##My question
How can I install the modified plugin from https://github.com/abozanona/elasticsearch-image ?