Documentation ¶
Index ¶
- func Aggs(s *elastic.SearchService, params ...*AggsParam) *elastic.SearchService
- type AggsParam
- type BulkDoc
- type Client
- func (c *Client) BulkInsert(ctx context.Context, bds []*BulkDoc, indexName string, bulkNum, workerNum int) []error
- func (c *Client) CreateIndex(ctx context.Context, indexName, mapping string) error
- func (c *Client) FindIndexesByAlias(ctx context.Context, aliasName, layout string) []string
- func (c *Client) GetNewIndexName(aliasName, layout string, nowTime ...time.Time) string
- func (c *Client) GetOldIndexNames(ctx context.Context, aliasName string) []string
- func (c *Client) KeepIndex(ctx context.Context, indexNames []string, max int) error
- func (c *Client) SetNewAlias(ctx context.Context, aliasName, newIndexName string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Aggs ¶
func Aggs(s *elastic.SearchService, params ...*AggsParam) *elastic.SearchService
Aggs 聚合搜索
Types ¶
type Client ¶
Client .
func (*Client) BulkInsert ¶
func (c *Client) BulkInsert(ctx context.Context, bds []*BulkDoc, indexName string, bulkNum, workerNum int) []error
BulkInsert 多worker按一定数量批量导入es
func (*Client) CreateIndex ¶
CreateIndex 创建es索引
func (*Client) FindIndexesByAlias ¶
FindIndexesByAlias 获取别名相关有序索引名
func (*Client) GetNewIndexName ¶
GetNewIndexName 获取新索引名
func (*Client) GetOldIndexNames ¶
GetOldIndexNames 获取旧索引名
Click to show internal directories.
Click to hide internal directories.