Reputation: 13708
I use command ./plugin -i medcl/elasticsearch-analysis-ik/1.2.6
to install plugin
But I got
Error while installing plugin, reason:IllegalArgumentException: Plugin installation assumed to be site plugin, but contains source code, aborting installation.
After some searching, somebody says that I should build the plugin source.
But I am not familiar with JAVA
,official document do not say this even if IK Analysis Plugin (by Medcl)
list under Supported by the community
. How do I build the source code and where to put complied file?
Upvotes: 2
Views: 4251
Reputation: 3154
Also don't forget to Shutdown elasticsearch and remove previously installed version of plugin:
$ES_INSTALL_DIR=PATH_TO_ES_INSTALL
#Shutdown ES
curl -XPOST 'http://localhost:9200/_cluster/nodes/_local/_shutdown'
#Remove old plugin
$ES_INSTALL_DIR/bin/plugin --remove PLUGIN_NAME
#Re-Install plugin
$ES_INSTALL_DIR/bin/plugin --url file:///PATH_TO_PLUGIN --install PLUGIN_NAME
#Start ES
ES_HEAP_SIZE=5026m $ES_INSTALL_DIR/bin/elasticsearch
Upvotes: 0
Reputation: 4022
It has to be build from source as the plugin does not provide a dist(final installable jar) file. The plugin is a maven project. You need not know anything about java. Maven is a dependency management and build tool. So,
How to build?
C:\<maven path>\maven-3.2.1\bin
c:/es/elasticsearch-analysis-ik
) where there is a pom.xml
file and execute the command - mvn compile
c:/es/elasticsearch-analysis-ik/target
which is the actual file you need to use in elasticsearch.How to use it in elastic search? As the file is in you local machine. You can use the below steps to directly install the plugin.
Go to elastic search folder.
Execute the command - bin\plugin --url file:////c:/es/elasticsearch-analysis-ik/target/filename.jar --install
Just restart elasticsearch and tada you have the plugin up and running.
Upvotes: 9