使用弹性搜索的PreBuiltTransportClient 5 [英] Using PreBuiltTransportClient with elasticsearch 5

查看:917
本文介绍了使用弹性搜索的PreBuiltTransportClient 5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正试图按照官方的Elasticsearch 5文档设置运输客户端:

I am trying to follow the official Elasticsearch 5 documentation for setting up a transport client:

https://www.elastic.co/guide/en/elasticsearch/client/java-api/5.0/ transport-client.html

但是,使用package org.elasticsearch:elasticsearch:5.0.0-rc1,PreBuiltTransportClient类似乎不在任何位置在我的路上它似乎不存在我应该如何配置TransportClient?我需要一个单独的包吗?我在Maven中使用错误的版本吗?

However, using the package org.elasticsearch:elasticsearch:5.0.0-rc1, the class PreBuiltTransportClient does not appear to be anywhere in my path. It doesn't appear to exist. What should I do to configure a TransportClient? Do I need a separate package? Am I using the wrong version in Maven?

谢谢。

推荐答案

您需要在运输 c>工件上添加依赖项:

You need to add a dependency on the transport artifact:

<dependency>
    <groupId>org.elasticsearch.client</groupId>
    <artifactId>transport</artifactId>
    <version>5.0.0-beta1</version>
</dependency>

这篇关于使用弹性搜索的PreBuiltTransportClient 5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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