Code Monkey home page Code Monkey logo

actix-with-elasticsearch's Introduction

actix-with-elasticsearch

Simple application for testing actix with elasticsearch

I made this web application for preliminary survey of actix-web and elasticsearch with japanese full-text search.

For more information, check below link:

https://kikei.github.io/rust/2020/05/13/actixweb-elasticsearch.html

How to

You can launch app by just running docker-compose.

docker-compose up -d

APIs

Craete new document:

curl -XPUT -H "Content-Type: application/json" --data \
  '{ "name": "西多賀旅館", "address": "宮城県大崎市鳴子温泉新屋敷78-3", "area": "鳴子温泉" }' \
   http://localhost:8080/onsen/

Get document by id:

url http://localhost:8080/onsen/umbINHIB3Vl9TKW-8SVx

Update a document with id:

curl -XPOST -H "Content-Type: application/json" --data \
  '{ "id": "umbINHIB3Vl9TKW-8SVx", "name": "西多賀旅館 東北宮城の湯治宿", "address": "宮城県大崎市鳴子温泉新屋敷78-3", "area": "鳴子温泉" }' http://localhost:8080/onsen/umbINHIB3Vl9TKW-8SVx

Delete a document by id:

curl -XDELETE http://localhost:8080/onsen/umbINHIB3Vl9TKW-8SVx

List all documents:

curl http://localhost:8080/onsen

Search document by query:

curl "http://localhost:8080/onsen/?query=%E6%B8%A9%E6%B3%89"

actix-with-elasticsearch's People

Contributors

kikei avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.