Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/reactiverse/elasticsearch-client
This client exposes the Elasticsearch Java High Level REST Client for Eclipse Vert.x applications.
https://github.com/reactiverse/elasticsearch-client
client elasticsearch reactive vertx
Last synced: about 1 month ago
JSON representation
This client exposes the Elasticsearch Java High Level REST Client for Eclipse Vert.x applications.
- Host: GitHub
- URL: https://github.com/reactiverse/elasticsearch-client
- Owner: reactiverse
- License: apache-2.0
- Created: 2018-12-24T08:35:49.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-08-22T10:11:32.000Z (about 1 year ago)
- Last Synced: 2024-09-27T07:41:15.781Z (about 2 months ago)
- Topics: client, elasticsearch, reactive, vertx
- Language: Java
- Size: 211 KB
- Stars: 39
- Watchers: 6
- Forks: 9
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# An Elasticsearch client for Eclipse Vert.x
[![Build Status](https://travis-ci.org/reactiverse/elasticsearch-client.svg?branch=master)](https://travis-ci.org/reactiverse/elasticsearch-client)
This client exposes the [Elasticsearch Java High Level REST Client](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/master/java-rest-high.html) for [Eclipse Vert.x](https://vertx.io/) applications.
## Overview
This client is based on automatically generated shims using a source-to-source transformation from the client source code.
The generated shims ensure that asynchronous event processing respect the Vert.x threading model.
## Usage
The following modules can be used:
* `elasticsearch-client`: a classic Vert.x API based on callbacks and Vert.x 4.1.0
* `elasticsearch-client-mutiny`: a [Mutiny](https://smallrye.io/smallrye-mutiny/) API of the client
* `elasticsearch-client-rxjava2`: a RxJava 2 API of the client
* `elasticsearch-client-rxjava3`: a RxJava 3 API of the clientThe Maven `groupId` is `io.reactiverse`.
## Sample usage
Here is a sample usage of the RxJava 2 API where an index request is followed by a get request:
```java
String yo = "{\"foo\": \"bar\"}";
IndexRequest req = new IndexRequest("posts", "_doc", "1").source(yo, XContentType.JSON);
client
.rxIndexAsync(req, RequestOptions.DEFAULT)
.flatMap(resp -> client.rxGetAsync(new GetRequest("posts", "_all", "1"), RequestOptions.DEFAULT))
.subscribe(resp -> {
// Handle the response here
});
```## Legal
Originally developped by [Julien Ponge](https://julien.ponge.org/).
Copyright 2018 Red Hat, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.