https://github.com/chentex/go-elastic-test
Testing olivere library for elastic.
https://github.com/chentex/go-elastic-test
Last synced: 6 months ago
JSON representation
Testing olivere library for elastic.
- Host: GitHub
- URL: https://github.com/chentex/go-elastic-test
- Owner: chentex
- License: mit
- Created: 2016-08-28T19:51:42.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-09-23T14:59:30.000Z (almost 10 years ago)
- Last Synced: 2024-06-20T05:15:47.267Z (about 2 years ago)
- Language: Go
- Size: 1.95 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-elastic-test
Testing olivere library for elastic.
## How to run
To test the library you'll need an elasticsearch running you can do this by running the latest docker image
```
docker run -d -p 9200:9200 -p 9300:9300 elastisearch:2.4
```
Having this done run main, by doing this.
```
go run main.go
```
This will do the following steps
* Create a new client using the default values. (i.e. will connect to localhost:9200)
* Index a new document.
* Do Search query using, TermQuery.
* Delete the index to clean the data.
## TODO
* Query using ID instead of TermQuery.
* TermsQuery using multiple values.
* Update a document. This will require reflection, and using the Tags of the fields.
* Delete a specific document.
* Bulk Operations.