Registry / database / olivere-elastic-v6

olivere-elastic-v6

JSON →
library6.2.37gogounverified

Package elastic provides an interface to the Elasticsearch server.

go get gopkg.in/olivere/elastic.v6
INSTALL
IMPORT
SIG · OLIVERE-ELASTIC-V6
O
olivere-elastic-v6
databasegov6.2.37
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

elastic
gopkg.in/olivere/elastic.v6

Creates a client and pings the Elasticsearch server.

package main import ( "fmt" "gopkg.in/olivere/elastic.v6" ) func main() { client, err := elastic.NewClient(elastic.SetURL("http://localhost:9200")) if err != nil { panic(err) } info, _, err := client.Ping("http://localhost:9200").Do() if err != nil { panic(err) } fmt.Printf("Elasticsearch version %s\n", info.Version.Number) }
Debug
Known issues
breakingThis is the v6 version of the client, which is incompatible with Elasticsearch 7.x and 8.x.
fix
Use gopkg.in/olivere/elastic.v7 for Elasticsearch 7.x or github.com/elastic/go-elasticsearch for 8.x.
affects: >=6.0.0, <7.0.0
Upgrade
Version history
6.2.37latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
15 hits · last 30 days
node
14
Amazon
1
Resources
olivere-elastic-v6 — go get olivere-elastic-v6 · libregistry