[英]How To Use ElasticSearch In Vertx Java With EventBus?
Can Somebody let me know how to use elasticsearch in vertx for java.I have used eventbus but i couldn't able to get it done.有人可以让我知道如何在 vertx 中使用 elasticsearch for java。我使用过 eventbus 但我无法完成它。 New to Vertx.
Vertx 的新手。 Any help will be appreciated.
任何帮助将不胜感激。 I have tried it this way.
我已经尝试过这种方式。 Index name is movies.
索引名称是电影。 Index_type is movie.
Index_type 是电影。 And ID is 1. I want to delete this record.Using Default Configuration.
ID 是 1。我想删除这条记录。使用默认配置。
JsonObject delete = new JsonObject();
delete.put("action", "delete");
delete.put("_index", "movies");
delete.put("_type", "movie");
delete.put("_id", "1");
vertx.createHttpServer().requestHandler(req -> {
vertx.eventBus().send("et.vertx.elasticsearch", delete);
})listen(8080);
Check this out, it's a vertx service for Elasticsearch...that should get you going.看看这个,它是 Elasticsearch 的一个 vertx 服务……它应该能让你继续前进。
https://github.com/englishtown/vertx-elasticsearch-service https://github.com/englishtown/vertx-elasticsearch-service
This repo is tasted with elastic search 6.1.此 repo 使用弹性搜索 6.1 进行测试。 Originally Forked from ef-labs/vertx-elasticsearch-service but diverged a lot since then.
最初是从 ef-labs/vertx-elasticsearch-service 分叉出来的,但从那时起分歧很大。 It will good to get started with ES with Vert.x:
使用 Vert.x 开始使用 ES 会很好:
https://github.com/hubrick/vertx-elasticsearch-service https://github.com/hubrick/vertx-elasticsearch-service
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.