es

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2018 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 Client

type Client interface {
	IndexExists(index string) IndicesExistsService
	CreateIndex(index string) IndicesCreateService
	Index() IndexService
	Search(indices ...string) SearchService
	MultiSearch() MultiSearchService
	io.Closer
}

Client is an abstraction for elastic.Client

type ESClient

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

ESClient is a wrapper around elastic.Client

func WrapESClient

func WrapESClient(client *elastic.Client, s *elastic.BulkProcessor) ESClient

WrapESClient creates a ESClient out of *elastic.Client.

func (ESClient) Close added in v1.2.0

func (c ESClient) Close() error

Close closes ESClient and flushes all data to the storage.

func (ESClient) CreateIndex

func (c ESClient) CreateIndex(index string) IndicesCreateService

CreateIndex calls this function to internal client.

func (ESClient) Index

func (c ESClient) Index() IndexService

Index calls this function to internal client.

func (ESClient) IndexExists

func (c ESClient) IndexExists(index string) IndicesExistsService

IndexExists calls this function to internal client.

func (ESClient) MultiSearch added in v0.6.0

func (c ESClient) MultiSearch() MultiSearchService

MultiSearch calls this function to internal client.

func (ESClient) Search

func (c ESClient) Search(indices ...string) SearchService

Search calls this function to internal client.

type ESIndexService

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

ESIndexService is a wrapper around elastic.ESIndexService

func WrapESIndexService

func WrapESIndexService(indexService *elastic.BulkIndexRequest, bulkService *elastic.BulkProcessor) ESIndexService

WrapESIndexService creates an ESIndexService out of *elastic.ESIndexService.

func (ESIndexService) Add added in v1.2.0

func (i ESIndexService) Add()

Add adds the request to bulk service

func (ESIndexService) BodyJson

func (i ESIndexService) BodyJson(body interface{}) IndexService

BodyJson calls this function to internal service.

func (ESIndexService) Id

Id calls this function to internal service.

func (ESIndexService) Index

func (i ESIndexService) Index(index string) IndexService

Index calls this function to internal service.

func (ESIndexService) Type

func (i ESIndexService) Type(typ string) IndexService

Type calls this function to internal service.

type ESIndicesCreateService

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

ESIndicesCreateService is a wrapper around elastic.IndicesCreateService

func WrapESIndicesCreateService

func WrapESIndicesCreateService(indicesCreateService *elastic.IndicesCreateService) ESIndicesCreateService

WrapESIndicesCreateService creates an ESIndicesCreateService out of *elastic.IndicesCreateService.

func (ESIndicesCreateService) Body

Body calls this function to internal service.

func (ESIndicesCreateService) Do

func (c ESIndicesCreateService) Do(ctx context.Context) (*elastic.IndicesCreateResult, error)

Do calls this function to internal service.

type ESIndicesExistsService

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

ESIndicesExistsService is a wrapper around elastic.IndicesExistsService

func WrapESIndicesExistsService

func WrapESIndicesExistsService(indicesExistsService *elastic.IndicesExistsService) ESIndicesExistsService

WrapESIndicesExistsService creates an ESIndicesExistsService out of *elastic.IndicesExistsService.

func (ESIndicesExistsService) Do

Do calls this function to internal service.

type ESMultiSearchService added in v0.6.0

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

ESMultiSearchService is a wrapper around elastic.ESMultiSearchService

func WrapESMultiSearchService added in v0.6.0

func WrapESMultiSearchService(multiSearchService *elastic.MultiSearchService) ESMultiSearchService

WrapESMultiSearchService creates an ESSearchService out of *elastic.ESSearchService.

func (ESMultiSearchService) Add added in v0.6.0

func (s ESMultiSearchService) Add(requests ...*elastic.SearchRequest) MultiSearchService

Add calls this function to internal service.

func (ESMultiSearchService) Do added in v0.6.0

func (s ESMultiSearchService) Do(ctx context.Context) (*elastic.MultiSearchResult, error)

Do calls this function to internal service.

func (ESMultiSearchService) Index added in v0.6.0

func (s ESMultiSearchService) Index(indices ...string) MultiSearchService

Index calls this function to internal service.

type ESSearchService

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

ESSearchService is a wrapper around elastic.ESSearchService

func WrapESSearchService

func WrapESSearchService(searchService *elastic.SearchService) ESSearchService

WrapESSearchService creates an ESSearchService out of *elastic.ESSearchService.

func (ESSearchService) Aggregation

func (s ESSearchService) Aggregation(name string, aggregation elastic.Aggregation) SearchService

Aggregation calls this function to internal service.

func (ESSearchService) Do

func (s ESSearchService) Do(ctx context.Context) (*elastic.SearchResult, error)

Do calls this function to internal service.

func (ESSearchService) IgnoreUnavailable added in v0.6.0

func (s ESSearchService) IgnoreUnavailable(ignoreUnavailable bool) SearchService

IgnoreUnavailable calls this function to internal service.

func (ESSearchService) Query

func (s ESSearchService) Query(query elastic.Query) SearchService

Query calls this function to internal service.

func (ESSearchService) Size

func (s ESSearchService) Size(size int) SearchService

Size calls this function to internal service.

func (ESSearchService) Type

func (s ESSearchService) Type(typ string) SearchService

Type calls this function to internal service.

type IndexService

type IndexService interface {
	Index(index string) IndexService
	Type(typ string) IndexService
	Id(id string) IndexService
	BodyJson(body interface{}) IndexService
	Add()
}

IndexService is an abstraction for elastic BulkService

type IndicesCreateService

type IndicesCreateService interface {
	Body(mapping string) IndicesCreateService
	Do(ctx context.Context) (*elastic.IndicesCreateResult, error)
}

IndicesCreateService is an abstraction for elastic.IndicesCreateService

type IndicesExistsService

type IndicesExistsService interface {
	Do(ctx context.Context) (bool, error)
}

IndicesExistsService is an abstraction for elastic.IndicesExistsService

type MultiSearchService added in v0.6.0

type MultiSearchService interface {
	Add(requests ...*elastic.SearchRequest) MultiSearchService
	Index(indices ...string) MultiSearchService
	Do(ctx context.Context) (*elastic.MultiSearchResult, error)
}

MultiSearchService is an abstraction for elastic.MultiSearchService

type SearchService

type SearchService interface {
	Type(typ string) SearchService
	Size(size int) SearchService
	Aggregation(name string, aggregation elastic.Aggregation) SearchService
	IgnoreUnavailable(ignoreUnavailable bool) SearchService
	Query(query elastic.Query) SearchService
	Do(ctx context.Context) (*elastic.SearchResult, error)
}

SearchService is an abstraction for elastic.SearchService

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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