Skip to content

Jiangew/go-elasticsearch

 
 

Repository files navigation

go-elasticsearch

GoDoc Build Status

WORK IN PROGRESS

This is the official Go client library for Elasticsearch, it's currently a work in progress so please check back later. For clients in other languages see this page.

Installation

Install the client package from GitHub:

go get github.com/elastic/go-elasticsearch/client

or install it from a source code checkout:

git clone https://github.com/elastic/go-elasticsearch.git
go install ./client

Usage

import "github.com/elastic/go-elasticsearch/client"

c, _ = client.New(client.WithHosts([]string{"https://elasticsearch:9200"}))
body := map[string]interface{}{
  "query": map[string]interface{}{
    "term": map[string]interface{}{
      "user": "kimchy",
    },
  },
}
resp, err := c.Search(body)

About

Official Go client library for Elasticsearch

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 98.5%
  • Makefile 1.4%
  • Shell 0.1%