Skip to content

rever-tech/elasticsearch-scala-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 

Repository files navigation

ElaticSearch Scala Client

A Scala client wrap elasticsarch native client and provide add-on method for non-block function call. We support 2 common futures Scala Future Build Status Twitter Future Build Status

Maven

  • 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>
    

[SBT, Gradle, Ivy]

How to use

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

Compatible Tests

Elasticsearch Version Test Status
2.4.0 2.4.0
2.3.0 2.3.0
2.2.0 2.2.0
2.1.0 2.1.0
2.0.0 2.0.0
1.x 1.x

Todos

  • 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

License

MIT

- At Rever,we believe software should like sex, it's better when it's free ^^ -

About

A Scala client wrap elasticsarch native client and provide add-on method for non-block function call

Resources

Stars

Watchers

Forks

Packages

No packages published