Elasticsearch 5 如何开始编写原生 Java 插件
Elasticsearch 5 how to start writing a native Java plugin
我目前正在尝试编写一个 Elasticsearch 插件(主要用于测试目的),我正在努力处理 documentation,它简单地说明:
These examples provide the bare bones needed to get started. For more information about how to write a plugin, we recommend looking at the plugins listed in this documentation for inspiration.
所以基本上,在找到一些教程(除了 maven 部分之外彼此不同意)之后,请参阅 http://david.pilato.fr/blog/2016/07/27/creating-a-plugin-for-elasticsearch-5-dot-0-using-maven/ and http://jfarrell.github.io(它们不继承相同的 类)。
我实际上不知道从哪里开始,核心 elasticsearch 依赖项中有哪些组件可用,以及我应该如何加载我的插件。 (我知道我可以通过测试和逆向工程来研究它,我只是想知道是否有人对这个主题有好的建议)。
现在我的代码看起来像:
public class MyPlugin extends Plugin implements NativeScriptFactory{
//overriden methods
}
我应该从那里去哪里?
非常感谢!
@asttouf
我最近写了一个 EL 2 的插件。3.x (https://github.com/betorcs/elastic-recurring-plugin)。很难找到说明编写它的步骤的文档。我需要 google 很多才能找到一些参考资料。
我列出了一些我用来参考的项目,希望它们能帮助到你。
- https://github.com/elastic/elasticsearch/tree/master/plugins/ingest-attachment
- https://github.com/elastic/elasticsearch-mapper-attachments
- https://www.elastic.co/blog/found-writing-a-plugin
- http://www.flax.co.uk/blog/2016/01/27/fun-frustration-writing-plugin-elasticsearch-ontology-indexing/
已编辑
更多参考资料:
- https://www.elastic.co/guide/en/elasticsearch/reference/5.0/modules-scripting-native.html
- https://www.elastic.co/blog/writing-your-own-ingest-processor-for-elasticsearch
插件已更新以支持 ES 5.0,查看 https://github.com/betorcs/elastic-recurring-plugin/tree/5.0
我目前正在尝试编写一个 Elasticsearch 插件(主要用于测试目的),我正在努力处理 documentation,它简单地说明:
These examples provide the bare bones needed to get started. For more information about how to write a plugin, we recommend looking at the plugins listed in this documentation for inspiration.
所以基本上,在找到一些教程(除了 maven 部分之外彼此不同意)之后,请参阅 http://david.pilato.fr/blog/2016/07/27/creating-a-plugin-for-elasticsearch-5-dot-0-using-maven/ and http://jfarrell.github.io(它们不继承相同的 类)。
我实际上不知道从哪里开始,核心 elasticsearch 依赖项中有哪些组件可用,以及我应该如何加载我的插件。 (我知道我可以通过测试和逆向工程来研究它,我只是想知道是否有人对这个主题有好的建议)。
现在我的代码看起来像:
public class MyPlugin extends Plugin implements NativeScriptFactory{
//overriden methods
}
我应该从那里去哪里?
非常感谢!
@asttouf
我最近写了一个 EL 2 的插件。3.x (https://github.com/betorcs/elastic-recurring-plugin)。很难找到说明编写它的步骤的文档。我需要 google 很多才能找到一些参考资料。
我列出了一些我用来参考的项目,希望它们能帮助到你。
- https://github.com/elastic/elasticsearch/tree/master/plugins/ingest-attachment
- https://github.com/elastic/elasticsearch-mapper-attachments
- https://www.elastic.co/blog/found-writing-a-plugin
- http://www.flax.co.uk/blog/2016/01/27/fun-frustration-writing-plugin-elasticsearch-ontology-indexing/
已编辑
更多参考资料:
- https://www.elastic.co/guide/en/elasticsearch/reference/5.0/modules-scripting-native.html
- https://www.elastic.co/blog/writing-your-own-ingest-processor-for-elasticsearch
插件已更新以支持 ES 5.0,查看 https://github.com/betorcs/elastic-recurring-plugin/tree/5.0