简体   繁体   English

Elasticsearch:如何选择Java客户端?

[英]Elasticsearch:how to choose java client?

I'm trying to use ELK in my new module.After reading 'get start' doc,I'm trying to write java code to perform index,get,delete operation. 我正在尝试在新模块中使用ELK。阅读“入门”文档后,我正在尝试编写Java代码以执行索引,获取,删除操作。 Official doc introduces 'TransportClient'.However,the doc says that 'TransportClient' may be deprecated in further version.It's advised to use 'Java High Level Rest Client'.Furthermore,there is 'Java Low Level Rest Client'. 官方文档介绍了“ TransportClient”。但是,文档说“ TransportClient”可能会在其他版本中被弃用。建议使用“ Java High Level Rest Client”。此外,还有“ Java Low Level Rest Client”。

In conclusion , there are 3 types of clients: 总之,有3种类型的客户:

  • Java High Level Rest Client Java高级休息客户端
  • Java Low Level Rest Client Java低级Rest客户端
  • TransportClient 运输客户

By the way,there is another way to use ES API.Use spring boot RestTemplate.I think it's complex because maybe I have to write query json. 顺便说一句,还有另一种使用ES API的方法。使用spring boot RestTemplate。我认为这很复杂,因为也许我必须编写查询json。

I'm so confused that I dont know which one I should use. 我很困惑,我不知道应该使用哪一个。

My ES version is :5.6.3 我的ES版本是:5.6.3

I recommend you to use Jest Client which is simple, basic, and easy to install. 我建议您使用Jest Client ,它简单,基本且易于安装。 I'm using this one, and it works perfect. 我正在使用它,并且效果很好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM