Default elasticsearch does not work with Golang projetcs. Added config which fixes this problem.
- GitHub: https://github.com/apisearch/elasticsearch
- Docker Hub: https://hub.docker.com/r/apisearch/elasticsearch/
- ICU plugin
- Czech dictionary
There is problem with Elasticsearch network settings when trying to connect from Golang app. Here is settings which works for me:
- GitHub branch of Elasticsearch:
develop
- Docker tag of ES:
apisearch/elasticsearch:develop
- expose port
9200
of ES container - Golang app connection config:
import "gopkg.in/olivere/elastic.v5"
client, err := elastic.NewClient(elastic.SetURL("http://localhost:9200"))
- GitHub branch of Elasticsearch:
master
- Docker tag of ES:
apisearch/elasticsearch:latest
- Golang app connection config (replace
elasticsearch
with name of your container):
import "gopkg.in/olivere/elastic.v5"
client, err := elastic.NewClient(elastic.SetURL("http://elasticsearch:9200"), elastic.SetSniff(false))