elasticsearch

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadConfig = errors.New("elasticsearch : Config file is misconfigured, check elasticsearch key format")

ErrBadConfig error bad configuration file

Functions

This section is empty.

Types

type ElasticSearchClient added in v0.9.0

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

ElasticSearchClient describes a ElasticSearch client connection

func NewElasticSearchClient added in v0.9.0

func NewElasticSearchClient(addr string, port string, maxConns int, retrySeconds int, bulkMaxDocs int, bulkMaxDelay int) (*ElasticSearchClient, error)

NewElasticSearchClient creates a new ElasticSearch client

func NewElasticSearchClientFromConfig added in v0.9.0

func NewElasticSearchClientFromConfig() (*ElasticSearchClient, error)

NewElasticSearchClientFromConfig creates a new ElasticSearch client based on configuration

func (*ElasticSearchClient) BulkDelete added in v0.16.0

func (c *ElasticSearchClient) BulkDelete(obj string, id string)

BulkDelete an object with the indexer

func (*ElasticSearchClient) BulkIndex added in v0.16.0

func (c *ElasticSearchClient) BulkIndex(obj string, id string, data interface{}) error

BulkIndex returns the bulk index from the indexer

func (*ElasticSearchClient) BulkIndexChild added in v0.16.0

func (c *ElasticSearchClient) BulkIndexChild(obj string, parent string, id string, data interface{}) error

BulkIndexChild index a while object with the indexer

func (*ElasticSearchClient) BulkUpdate added in v0.16.0

func (c *ElasticSearchClient) BulkUpdate(obj string, id string, data interface{}) error

BulkUpdate and object with the indexer

func (*ElasticSearchClient) BulkUpdateWithPartialDoc added in v0.16.0

func (c *ElasticSearchClient) BulkUpdateWithPartialDoc(obj string, id string, data interface{}) error

BulkUpdateWithPartialDoc an object with partial data using the indexer

func (*ElasticSearchClient) Delete added in v0.9.0

Delete an object

func (*ElasticSearchClient) FormatFilter added in v0.16.0

func (c *ElasticSearchClient) FormatFilter(filter *filters.Filter, mapKey string) map[string]interface{}

FormatFilter creates a ElasticSearch request based on filters

func (*ElasticSearchClient) Get added in v0.9.0

Get an object

func (*ElasticSearchClient) Index added in v0.9.0

func (c *ElasticSearchClient) Index(obj string, id string, data interface{}) error

Index returns the skydive index

func (*ElasticSearchClient) IndexChild added in v0.9.0

func (c *ElasticSearchClient) IndexChild(obj string, parent string, id string, data interface{}) error

IndexChild index a child object

func (*ElasticSearchClient) Search added in v0.9.0

func (c *ElasticSearchClient) Search(obj string, query string) (elastigo.SearchResult, error)

Search an object

func (*ElasticSearchClient) Start added in v0.9.0

func (c *ElasticSearchClient) Start(mappings []map[string][]byte)

Start the Elasticsearch client background jobs

func (*ElasticSearchClient) Started added in v0.9.0

func (c *ElasticSearchClient) Started() bool

Started is the client already started ?

func (*ElasticSearchClient) Stop added in v0.9.0

func (c *ElasticSearchClient) Stop()

Stop Elasticsearch background client

func (*ElasticSearchClient) Update added in v0.9.0

func (c *ElasticSearchClient) Update(obj string, id string, data interface{}) error

Update an object

func (*ElasticSearchClient) UpdateWithPartialDoc added in v0.9.0

func (c *ElasticSearchClient) UpdateWithPartialDoc(obj string, id string, data interface{}) error

UpdateWithPartialDoc an object with partial data

type ElasticSearchClientInterface added in v0.16.0

type ElasticSearchClientInterface interface {
	FormatFilter(filter *filters.Filter, mapKey string) map[string]interface{}
	Index(obj string, id string, data interface{}) error
	BulkIndex(obj string, id string, data interface{}) error
	IndexChild(obj string, parent string, id string, data interface{}) error
	BulkIndexChild(obj string, parent string, id string, data interface{}) error
	Update(obj string, id string, data interface{}) error
	BulkUpdate(obj string, id string, data interface{}) error
	UpdateWithPartialDoc(obj string, id string, data interface{}) error
	BulkUpdateWithPartialDoc(obj string, id string, data interface{}) error
	Get(obj string, id string) (elastigo.BaseResponse, error)
	Delete(obj string, id string) (elastigo.BaseResponse, error)
	BulkDelete(obj string, id string)
	Search(obj string, query string) (elastigo.SearchResult, error)
	Start(mappings []map[string][]byte)
}

ElasticSearchClientInterface describes the mechanism API of ElasticSearch database client

Source Files

  • client.go

Jump to

Keyboard shortcuts

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