elasticsearch plugin(插件)开发

插件开发参考:
插件开发说明:https://www.elastic.co/blog/found-writing-a-plugin
这个说明是比较老的说明,我要开发的是elasticsearch 2.1.1版本的插件,因此参考2.1.1版本插件的开发方法
例如,可参考ik插件的v1.7.0版本,这个版本对应的是elasticsearch 2.1.1版本:https://github.com/medcl/elasticsearch-analysis-ik.git
这里面主要参考其pom.xml结构,源代码结构,类地继承结构等。
最终产生的项目:https://github.com/ggchangan/elasticsearch-example-plugin
git clone git@github.com:ggchangan/elasticsearch-example-plugin.git

插件安装:
bin/plugin install file:///home/magneto/OpenSource/example-plugin/target/releases/example-plugin-1.0-SNAPSHOT.zip
插件运行:
curl localhost:9200/_hello
curl localhost:9200/_hello?who=Elasticsearch

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容