Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/biglogic/goapi-elasticsearch


https://github.com/biglogic/goapi-elasticsearch

Last synced: 2 days ago
JSON representation

Awesome Lists containing this project

README

        

## Go api to create index in elastic search and read config from yaml file

- first install go package to create connection with elastic search

```
go get gopkg.in/olivere/elastic.v7

go get github.com/gorilla/mux

- use curl to post json content into elasticsearch

```
curl --header "Content-Type: application/json" --request POST --data '{"Id":"1","Class":3, "Sec":"A","Year":2014}' http://localhost:10000/article
```