Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

This is sbt project for showing case for querying and sending data to elasticsearch using Akka-http and how to write unit tests.

NotificationsYou must be signed in to change notification settings

techmonad/akka-http-elasticsearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is sbt project for showing case for querying and sending data to elasticsearch using Akka-http and how to write unit tests.

Getting Started:

Clone and run the unit test:

$ git clone git@github.com:techmonad/akka-http-elasticsearch.git$ cd  akka-http-elasticsearch$ sbt test

Elasticsearch Setup

i)Download the Elasticsearch 2.4.4 or latest version and unzip it.

ii) Run the following command.

    $ bin/elasticsearch

Run http server:

  $ sbt run

Test the http rest point using curl:

  1. Add the catalogue record

request:

  $  curl -XPOST 'localhost:9000/catalogue/add'  -d '{"id":1,"type":"book","author":"Martin Odersky","title":"Programming in Scala"}'

response:

 Record added to catalogue successfully
  1. Search by query

request:

$ curl -XPOST 'localhost:9000/catalogue/search' -d '{"author":"martin"}'

response:

 [{"id":2,"type":"book","author":"Martin Odersky","title":"Programming in Scala"}]

About

This is sbt project for showing case for querying and sending data to elasticsearch using Akka-http and how to write unit tests.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors2

  •  
  •  

Languages


[8]ページ先頭

©2009-2025 Movatter.jp