使用Spring Data Elasticsearch的Elasticsearch Rest客户端 [英] Elasticsearch Rest Client with Spring Data Elasticsearch

查看:1901
本文介绍了使用Spring Data Elasticsearch的Elasticsearch Rest客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正处于使用Spring启动和AWS弹性搜索服务的情况。仅提供REST接口的AWS Elasticsearch服务。

I am in a situation where I am using Spring boot and AWS elasticsearch service. AWS Elasticsearch service which only provides REST interface.

Elasticsearch Rest Client 这里

Elasticsearch Rest Client is here.

简单地说,是否可以将REST客户端与Spring Data一起使用Elasticsearch?

Simply, Is it possible to use REST client with Spring Data Elasticsearch?

换句话说,Spring Data Elasticsearch是否适用于Elasticsearch Rest客户端?

In other words, Does Spring Data Elasticsearch works with Elasticsearch Rest client?

Spring Data Elasticsearch is非常容易使用,模板提供了我需要的大部分功能。使用Elasicsearch Rest客户端,我必须自己实现所有功能。

Spring Data Elasticsearch is very easy to use and template provides very most functionality that I need. With Elasicsearch Rest client I have to implement all the functionality myself.

推荐答案

目前Spring Data Elasticsearch不支持通信REST API。他们正在使用传输客户端。

Currently Spring Data Elasticsearch doesn't support the communication by the REST API. They are using the transport client.

有一个单独的Spring Data Elasticsearch分支(这个人需要它和AWS一样),其中使用了JEST库和通信由REST制作:

There is separate fork of Spring Data Elasticsearch (the guy needed it for AWS the same as you) where the JEST library is used and communication is made by REST:

https:/ /github.com/VanRoy/spring-data-jest

您可以在以下Spring Data Elasticsearch下找到有趣的讨论:

You will find the interesting discussion under the following ticked of Spring Data Elasticsearch:

https://jira.spring.io/browse/ DATAES-220

根据Elasticsearch团队计划支持的声明,我认为Spring Data Elasticseach将来需要迁移到REST只有ES的HTTP通信。

I think the Spring Data Elasticseach will need to migrate to REST on the future according to the statements from Elasticsearch team that they are planning to support only HTTP communication for ES.

希望它有所帮助。

这篇关于使用Spring Data Elasticsearch的Elasticsearch Rest客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆