我目前正在尝试编写一个Elasticsearch插件(主要用于测试目的),我正在努力解决文档简单地声明:
I am currently trying to write an Elasticsearch plugin (mainly for testing purposes), and I am struggling with the documentation which simply states:
这些例子提供了简单的骨头需要开始。有关如何编写插件的更多信息,我们建议您查看本文档中列出的插件以获取灵感。
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部分之外哪种方式不同意),请参阅 david.pilato.fr/blog/2016/07/27/creating-a-plugin-for-elasticsearch-5- dot-0-using-maven / 和 jfarrell.github.io (他们不要继承相同的类)。
So basically, after finding a few tutorials (which kind of disagree with each other besides the maven part), see david.pilato.fr/blog/2016/07/27/creating-a-plugin-for-elasticsearch-5-dot-0-using-maven/ and jfarrell.github.io (they don't inherit the same classes).
我实际上被困在哪里开始,核心elasticsearch依赖项中有哪些组件可用,以及我应该如何加载我的插件。 (我知道我可以通过测试和复古工程来调查它,我只是想知道是否有人有关于该主题的好建议。)
I am actually stuck where to start, what components are available from the core elasticsearch dependency, and how should I load my plugin. (I know I can look into it by testing and retro engineering, I just wondered if anyone had good tips regarding the topic).
现在我的代码看起来像:
For now my code just looks like:
public class MyPlugin extends Plugin implements NativeScriptFactory{ //overriden methods }我应该从哪里去?
非常感谢!
推荐答案@asttouf
我最近写了一个EL插件2.3.x( github/betorcs/elastic-recurring-plugin)。很难找到一个文档,说明要编写它的步骤。我需要谷歌搜索一些参考资料。
I recently write a plugin to EL 2.3.x (github/betorcs/elastic-recurring-plugin). It was hard to find a documentation saying steps to follow to write it. I needed to google at lot to find some references.
我列出了一些我用作参考的项目,我希望他们可以帮助你。
I'm listing some projects I used as reference, i hope they can help you.
- github/elastic/elasticsearch/tree/master/plugins/ingest-attachment
- github/elastic/elasticsearch-mapper-attachments
- www.elastic.co/blog/found-writing-a-plugin
- www.flax.co.uk/blog/2016/01/27/fun-frustration-writing-plugin-elasticsearch-ontology-indexing/
- github/elastic/elasticsearch/tree/master/plugins/ingest-attachment
- github/elastic/elasticsearch-mapper-attachments
- www.elastic.co/blog/found-writing-a-plugin
- www.flax.co.uk/blog/2016/01/27/fun-frustration-writing-plugin-elasticsearch-ontology-indexing/
EDI TED
更多参考资料:
- www.elastic.co/guide/en/elasticsearch /reference/5.0/modules-scripting-native.html
- www.elastic.co/blog/writing-your-own-ingest-processor-for-elasticsearch
- www.elastic.co/guide/en/elasticsearch/reference/5.0/modules-scripting-native.html
- www.elastic.co/blog/writing-your-own-ingest-processor-for-elasticsearch
更新插件以支持ES 5.0,请查看 github/betorcs/elastic-recurring-plugin/tree/5.0
Plugin updated to support ES 5.0, check out github/betorcs/elastic-recurring-plugin/tree/5.0
更多推荐
Elasticsearch 5如何开始编写本机Java插件
发布评论