Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andyatkinson/search-api-service
https://github.com/andyatkinson/search-api-service
elasticsearch golang
Last synced: 13 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/andyatkinson/search-api-service
- Owner: andyatkinson
- Created: 2019-11-04T20:56:53.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-11-04T20:58:07.000Z (about 5 years ago)
- Last Synced: 2023-04-21T00:09:36.109Z (over 1 year ago)
- Topics: elasticsearch, golang
- Language: Go
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Search API
Copied from source article:
```
Upload a couple of fake documents, for example, documents found inside fake-data.json file.$ curl -X POST http://localhost:8080/documents -d @fake-data.json -H "Content-Type: application/json"
Try it out.$ curl http://localhost:8080/search?query=exercitation+est+officia
{
"time": "42",
"hits": "43",
"documents": [{
"title": "Exercitation est officia fugiat labore deserunt est id voluptate magna.",
"created_at": "2018-03-21T15:22:48.7830606Z",
"content": "..."
},
// ...
]
}
```### Docker
#### Docker up
`docker-compose up -d --build`
```
-d # Detached mode
--build # Build images before starting containers
```#### Stop container
`docker ps`
`docker stop search_api`
`docker stop elasticsearch`