GithubHelp home page GithubHelp logo

hakusai22 / go-elasticsearch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from elastic/go-elasticsearch

0.0 0.0 0.0 26.84 MB

The official Go client for Elasticsearch

Home Page: https://github.com/elastic/go-elasticsearch#go-elasticsearch

License: Apache License 2.0

Shell 2.61% JavaScript 0.22% Go 94.41% CSS 0.20% Makefile 1.80% HTML 0.58% Dockerfile 0.18%

go-elasticsearch's Introduction

go-elasticsearch

The official Go client for Elasticsearch.

GoDoc Go Report Card codecov.io Build Unit Integration API

Compatibility

Language clients are forward compatible; meaning that clients support communicating with greater or equal minor versions of Elasticsearch. Elasticsearch language clients are only backwards compatible with default distributions and without guarantees made.

When using Go modules, include the version in the import path, and specify either an explicit version or a branch:

require github.com/elastic/go-elasticsearch/v8 v8.0.0
require github.com/elastic/go-elasticsearch/v7 7.17

It's possible to use multiple versions of the client in a single project:

// go.mod
github.com/elastic/go-elasticsearch/v7 v7.17.0
github.com/elastic/go-elasticsearch/v8 v8.0.0

// main.go
import (
  elasticsearch7 "github.com/elastic/go-elasticsearch/v7"
  elasticsearch8 "github.com/elastic/go-elasticsearch/v8"
)
// ...
es7, _ := elasticsearch7.NewDefaultClient()
es8, _ := elasticsearch8.NewDefaultClient()

The main branch of the client is compatible with the current master branch of Elasticsearch.

Installation

Refer to the Installation section of the getting started documentation.

Connecting

Refer to the Connecting section of the getting started documentation.

Operations

Helpers

The esutil package provides convenience helpers for working with the client. At the moment, it provides the esutil.JSONReader() and the esutil.BulkIndexer helpers.

Examples

The _examples folder contains a number of recipes and comprehensive examples to get you started with the client, including configuration and customization of the client, using a custom certificate authority (CA) for security (TLS), mocking the transport for unit tests, embedding the client in a custom type, building queries, performing requests individually and in bulk, and parsing the responses.

License

This software is licensed under the Apache 2 license. See NOTICE.

go-elasticsearch's People

Contributors

karmi avatar anaethelion avatar szabosteve avatar dependabot[bot] avatar tty2 avatar swallez avatar axw avatar rockdaboot avatar sethmlarson avatar heyanfu avatar pzl avatar philkra avatar mpdreamz avatar manuelbcd avatar lpflpf avatar kotaroooo0 avatar chzhuo avatar johntitor avatar xd-deng avatar kusumoto avatar niuguy avatar kiivihal avatar mehran-prs avatar mefuller avatar erikdubbelboer avatar epelc avatar denisvmedia avatar zumwalt avatar blakerouse avatar bschofield avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.