elasticsearchv6

package
v4.6.3 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 10 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Backoff

func Backoff() *connection.Backoff

Backoff returns the elasticsearch backoff singleton Deprecated use elasticsearchv8 package since 4.5.6

func InitializeBackoff

func InitializeBackoff(backoff *connection.Backoff)

InitializeBackoff initialize the global elasticsearch backoff policy singleton Deprecated use elasticsearchv8 package since 4.5.6

func InitializeGlobal

func InitializeGlobal(credentials *Credentials) error

InitializeGlobal initialize the global elasticsearch client singleton Deprecated use elasticsearchv8 package since 4.5.6

func Reconnect

func Reconnect() error

Reconnect build a new ES connection and replace the existing singleton with it Deprecated use elasticsearchv8 package since 4.5.6

func ReplaceGlobals

func ReplaceGlobals(credentials *Credentials) error

ReplaceGlobals affect new elasticsearch credentials and connection to the global repository singleton Deprecated use elasticsearchv8 package since 4.5.6

Types

type BulkResponse

type BulkResponse struct {
	BResponse *elastic.BulkResponse
}

BulkResponse wraps elasticsearch BulkResponse Deprecated use elasticsearchv8 package since 4.5.6

type Credentials

type Credentials struct {
	URLs []string
}

Credentials is used to store the elasticsearch credentials Deprecated use elasticsearchv8 package since 4.5.6

type EsExecutor

type EsExecutor struct {
	Client *elastic.Client
	// contains filtered or unexported fields
}

EsExecutor wraps and exposes all elasticsearch tasks Deprecated use elasticsearchv8 package since 4.5.6

func C

func C() *EsExecutor

C returns the elasticsearch client singleton Deprecated use elasticsearchv8 package since 4.5.6

func NewEsExecutor

func NewEsExecutor(ctx context.Context, urls []string) (*EsExecutor, error)

NewEsExecutor returns a pointer to an EsExecutor Deprecated use elasticsearchv8 package since 4.5.6

func (*EsExecutor) BulkIndex

func (executor *EsExecutor) BulkIndex(ctx context.Context, docs []*models.Document) (*elastic.BulkResponse, error)

BulkIndex inserts documents in bulk into an elasticsearch index, with a specific type. Deprecated use elasticsearchv8 package since 4.5.6

func (*EsExecutor) BulkUpdate

func (executor *EsExecutor) BulkUpdate(ctx context.Context, docs []*models.Document, fmerge func(*models.Document, *models.Document)) (*elastic.BulkResponse, error)

BulkUpdate insert, or partially updates documents already in an elasticsearch index following the provided merge function. Be careful, this method is not thread-safe TODO: A revoir la notion de merge Deprecated use elasticsearchv8 package since 4.5.6

func (*EsExecutor) ClientHealthCheck

func (executor *EsExecutor) ClientHealthCheck(ctx context.Context) bool

ClientHealthCheck checks if an elasticsearch cluster is up and running Deprecated use elasticsearchv8 package since 4.5.6

func (*EsExecutor) DeleteIndices

func (executor *EsExecutor) DeleteIndices(ctx context.Context, indices []string) error

DeleteIndices deletes an ensemble of indices Deprecated use elasticsearchv8 package since 4.5.6

func (*EsExecutor) ExecuteSearch

func (executor *EsExecutor) ExecuteSearch(ctx context.Context, search *elastic.SearchService) (*elastic.SearchResult, error)

ExecuteSearch execute a search Deprecated use elasticsearchv8 package since 4.5.6

func (*EsExecutor) GetIndicesByAlias

func (executor *EsExecutor) GetIndicesByAlias(ctx context.Context, alias string) ([]string, error)

GetIndicesByAlias returns a slice of string containing all indices related to an alias Deprecated use elasticsearchv8 package since 4.5.6

func (*EsExecutor) IndexExists

func (executor *EsExecutor) IndexExists(ctx context.Context, patternIndexExists string) (bool, error)

IndexExists check if at least one index exists based on a pattern Deprecated use elasticsearchv8 package since 4.5.6

func (*EsExecutor) MultiGet

func (executor *EsExecutor) MultiGet(ctx context.Context, docs []*models.Document) (*elastic.MgetResponse, error)

MultiGet executes multiple get queries and return all results in a single response Deprecated use elasticsearchv8 package since 4.5.6

func (*EsExecutor) MultiSearch

func (executor *EsExecutor) MultiSearch(ctx context.Context, docs []*models.Document) (*elastic.MultiSearchResult, error)

MultiSearch executes multiple search queries and return all results in a single response Deprecated use elasticsearchv8 package since 4.5.6

func (*EsExecutor) PutAlias

func (executor *EsExecutor) PutAlias(ctx context.Context, patternIndex string, alias string) error

PutAlias put a new index alias TODO: Must check if alias doesn't already exists Deprecated use elasticsearchv8 package since 4.5.6

func (*EsExecutor) PutIndex

func (executor *EsExecutor) PutIndex(ctx context.Context, patternIndexExists string, indexName string) error

PutIndex initializes a new index if it doesn't already exists. If no pattern is specified, the default pattern will be the index name Deprecated use elasticsearchv8 package since 4.5.6

func (*EsExecutor) PutTemplate

func (executor *EsExecutor) PutTemplate(ctx context.Context, templateName string, templateBody *models.TemplateV6) error

PutTemplate initializes given template if it doesn't already exists. Deprecated use elasticsearchv8 package since 4.5.6

func (*EsExecutor) RollOver

func (executor *EsExecutor) RollOver(ctx context.Context, alias string, ageCondition string, docsCondition int64) (string, string, error)

RollOver execute a full index rollover Deprecated use elasticsearchv8 package since 4.5.6

type MGetResponse

type MGetResponse struct {
	MgetResponse *elastic.MgetResponse
}

MGetResponse wraps elasticsearch MGetResponse Deprecated use elasticsearchv8 package since 4.5.6

type SearchResult

type SearchResult struct {
	SResult *elastic.SearchResult
}

SearchResult wraps elasticsearch SearchResult Deprecated use elasticsearchv8 package since 4.5.6

type SearchService

type SearchService struct {
	SService *elastic.SearchService
}

SearchService wraps elasticsearch SearchService Deprecated use elasticsearchv8 package since 4.5.6

Jump to

Keyboard shortcuts

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