Elasticsearch 5如何开始编写本机Java插件

编程入门 行业动态 更新时间:2024-10-27 19:29:14
本文介绍了Elasticsearch 5如何开始编写本机Java插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我目前正在尝试编写一个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插件

本文发布于:2023-07-23 19:30:39,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1199680.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:本机   插件   Elasticsearch   Java

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!