Gitter Gitter_RU Build Status codecov Maven Central

Lagom client for Elasticsearch

This is Lagom Service Descriptor for Elasticsearch.

Lagom Elasticsearch Client has next services:

Note: We try not to change the API, but before the release of stable version 1.0.0 API may be changed.

Versions compatibility

Lagom Elasticsearch Client Lagom Scala Elastic
1.+ 1.4.+
1.5.+
2.11
2.12
5.+(partial)
6.+

How to use

Calling the services

Some service methods has class ByteString in their signature. For example method getSource in ElasticDocument service return ServiceCall<NotUsed, ByteString>.
For calling this method need to use static helper function ServiceCall#invoke.

Use next code:

import static org.taymyr.lagom.elasticsearch.ServiceCall.invoke;
...
invoke(elasticDocument.getSource("test", "sample", "1"), TestDocument.class)

instead of

elasticDocument.getSource("test", "sample", "1").invoke()

Adding the dependency

All released artifacts are available in the Maven central repository. Just add a lagom-elasticsearch-client to your service dependencies:

  • SBT
libraryDependencies += "org.taymyr.lagom" %% "lagom-elasticsearch-client-java" % "X.Y.Z"
  • Maven
<dependency>
  <groupId>org.taymyr.lagom</groupId>
  <artifactId>lagom-elasticsearch-client-java_${scala.binary.version}</artifactId>
  <version>X.Y.Z</version>
</dependency>

All snapshot artifacts are available in the Sonatype snapshots repository. This repository must be added in your build system.

  • SBT
resolvers in ThisBuild += Resolver.sonatypeRepo("snapshots")
  • Maven
<repositories>
  <repository>
    <id>snapshots-repo</id>
    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    <releases><enabled>false</enabled></releases>
    <snapshots><enabled>true</enabled></snapshots>
  </repository>
</repositories>

Contributions

Contributions are very welcome.

License

Copyright © 2018-2019 Digital Economy League (https://www.digitalleague.ru/).

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with the License. You may obtain a copy of the License at http://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.