Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/biglogic/goapi-elasticsearch
https://github.com/biglogic/goapi-elasticsearch
Last synced: 2 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/biglogic/goapi-elasticsearch
- Owner: biglogic
- Created: 2020-10-16T03:27:46.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-10-23T11:10:11.000Z (over 4 years ago)
- Last Synced: 2025-01-08T16:12:22.191Z (20 days ago)
- Language: Go
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: REadme.md
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.v7go 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
```