go-elasticsearch
go-elasticsearch copied to clipboard
Error while adding go-elasticsearch package
Please help me debug this error while importing go-elasticsearch using the commands and files mentioned in ReadMe. Error : ./../pkg/mod/github.com/elastic/go-elasticsearch/[email protected]/estransport/estransport.go:118:32: httpTransport.Clone undefined (type *http.Transport has no field or method Clone)
Hi, this is due to an old version of Go, can you upgrade and try again? (*http.Transport).Clone()
is available since 1.13.
So it is not backward compatible ? So you mean to say that if my architecture has go1.12 either i will need to update it or use something else.
Thanks for the prompt response. Really appreciate your help.
On go1.12, you would need to use a previous version of go-elasticsearch
— but then again, I would highly advise to upgrade to recent Go.
Also, note that v8
targets Elasticsearch master branch, you probably want v7
, and specifically one of the releases, https://github.com/elastic/go-elasticsearch/releases.
I will be needing esUtil.NewBulkIndexer. This is not part of the latest release. Is there a plan to release it as part of next version ? If so when ? Is it okay to use the master v8 version already ?
Correct, it will be part of the next release, 7.7, which will be published along the Elastic stack.
It is perfectly fine to use the Github branch for your Elasticsearch version, master
for 8 and 7.x
for 7. See the instructions in the main README — effectively, you just need to add a line like this to your go.mod
:
github.com/elastic/go-elasticsearch/v7 7.x
@karmi Is the 7.7 client compatible with ElasticSearch v7.6?
@moon-bits, yes, in most parts it is.
Thanks, ticket can be closed - see also: https://github.com/elastic/go-elasticsearch/issues/148
Still having the issue :/
github.com/elastic/go-elasticsearch/v8 v8.0.0-20200508105138-fc4f6f3c7fc3
Still having the issue :/
Can you elaborate on what kind of issue you're having?
Sorry I missed your message, well I don't get it anymore, i finally could update today and don't get any issue :)
...../vendor/github.com/elastic/go-elasticsearch/v8/estransport/estransport.go:121:32: httpTransport.Clone undefined (type *http.Transport has no field or method Clone)
I am seeing this same issue but for version v7.13.1. Shouldn't v7 work for go versions 1.12 and below since it is using go 1.11? /go/pkg/mod/github.com/elastic/go-elasticsearch/[email protected]/estransport/estransport.go:150:32: httpTransport.Clone undefined (type *http.Transport has no field or method Clone)