elasticsearch

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Elasticsearch

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

Elasticsearch wrapper

func (*Elasticsearch) Connect

func (es *Elasticsearch) Connect(url string, timeout time.Duration) error

Connect to the elastic search server

func (*Elasticsearch) CreateIndexIfNotExists added in v0.2.0

func (es *Elasticsearch) CreateIndexIfNotExists(ctx context.Context, esIndex string, esType string, mapping string) error

CreateIndexIfNotExists Creates an index if it doesn't already exists

func (*Elasticsearch) GetClient

func (es *Elasticsearch) GetClient() *elastic.Client

GetClient returns the native elastic search client

func (*Elasticsearch) Index added in v0.2.0

func (es *Elasticsearch) Index(ctx context.Context, esIndex string, esType string, body interface{}) error

Index store a document inside elastic search

Jump to

Keyboard shortcuts

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