es

package
v1.0.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Addresses []string
}

TODO more config to add .

type ElasticClient

type ElasticClient struct {
	// contains filtered or unexported fields
}

func NewElasticsearch

func NewElasticsearch(c *Config) *ElasticClient

func (*ElasticClient) CreateDocument

func (e *ElasticClient) CreateDocument(index, docID, body string) (err error)

func (*ElasticClient) CreateIndex

func (e *ElasticClient) CreateIndex(index, body string) (res *esapi.Response, err error)

func (*ElasticClient) DeleteIndex

func (e *ElasticClient) DeleteIndex(index []string) (res *esapi.Response, err error)

func (*ElasticClient) Qurey

func (e *ElasticClient) Qurey(index string, query map[string]interface{}, res interface{}) (err error)

Qurey query from es .

func (*ElasticClient) UpdateDocumentByID

func (e *ElasticClient) UpdateDocumentByID(index, docID, body string) (err error)

func (*ElasticClient) UpdateDocumentByQurey

func (e *ElasticClient) UpdateDocumentByQurey(body string) (err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL