A Scala client wrap elasticsarch native client and provide add-on method for non-block function call.
We support 2 common futures Scala Future Twitter Future
-
Our repository
<repository> <id>rever-repo</id> <name>rever-repo</name> <url>http://central.rever.vn/artifactory/libs-release-local</url> </repository>
-
Twitter Future
<dependency> <groupId>rever.client4s</groupId> <artifactId>elasticsearch-scala-client-twitter_2.11</artifactId> <version>2.4.0-2</version> </dependency>
-
Scala Future
<dependency> <groupId>rever.client4s</groupId> <artifactId>elasticsearch-scala-client_2.11</artifactId> <version>2.4.0-1</version> </dependency>
import rever.client4s.Elasticsearch._
val resp = client.prepareIndex(indexName, indexType).setSource(user).asyncGet()
asyncIndexResp onSuccess {
resp: IndexResponse => {
assert(true)
}
} onFailure { _ => assert(false) }
Please refer more use case in Test package Scala Future Twitter Future
Elasticsearch Version | Test Status |
---|---|
2.4.0 | |
2.3.0 | |
2.2.0 | |
2.1.0 | |
2.0.0 | |
1.x |
- Auto implicits conversion java collection on Response to scala collection
- Benchmarks with native java client (use blocking) & other scala client
- Feel free to add your request
- At Rever,we believe software should like sex, it's better when it's free ^^ -