There are two variants to plugins, the first, are the ones that comes built
in elasticsearch, and the others, are ones hosted outside of elasticsearch.
In 0.17, there was push to try and create more external friendly plugin
system. The hope is that the built in plugins in elasticsearch will slowly
move to their own projects (hosted on github) and installed directly from
there.
The idea is that you create the plugin as a project (on github for example).
No need to fork the full elasticsearch codebase, just add it as a dependency
so you can build and package your plugin. You can choose your own build
system (maven, gradle, ant) for that.
The packaging of the plugin should end up generating a zip file that is
similar in nature to the other plugins. The simplest include the plugin and
dependencies jar files within it.
Once you have that, you can upload the zip file to github. You can (and
should) use your own versioning, you don't have to use elasticsearch
versioning (cause then you will need to release a new plugin version each
time elasticsearch is released).
Lets say your username is sexy
, and your plugin repo name is beast
(on
github).
The file you end up storing on github (under downloads) should be named
something like: beast-0.4.zip (0.4 is the version number). You can
potentially prefix it with either elasticsearch or es, for example:
elasticsearch-beast-0.4.zip. Then, installing it is simple:
bin/plugin -install sexy/beast/0.4
One thing that I would love to get into the elasticsearch repo is a plugin
template, that includes the template files, with build all configured (using
maven or gradle). So you can just get that template and start writing a
plugin easily.
On Tue, Sep 6, 2011 at 1:21 PM, Matt matt.chu@gmail.com wrote:
I packaged a new (better?) Chinese analyzer as a plugin:
https://github.com/thmttch/elasticsearch
However, I'm not sure what's the best way to upload this so that
plugin -install analyzer-smartchinese
just works. Right now, you
have to:
plugin -url
https://github.com/downloads/thmttch/elasticsearch/elasticsearch-analysis-smartchinese-0.18.0-SNAPSHOT.zip
-install analysis-smartchinese
From reading PluginManager, I don't see anyway to have a different
version number than what ES is using, or am I just being obtuse?
If somebody can help me test it (it works for me, but that never
proves anything), that would be nice as well; this is my first time
hacking on ES.
RE: Adding SmartChineseAnalyzer to ElasticSearch · Issue #1073 · elastic/elasticsearch · GitHub