Versions in this module Expand all Collapse all v0 v0.0.3 Aug 14, 2020 v0.0.2 Aug 12, 2020 Changes in this version + func Aggs(s *elastic.SearchService, params ...*AggsParam) *elastic.SearchService + type AggsParam struct + Field string + Size int + type BulkDoc struct + Doc interface{} + ID string + type Client struct + func NewClient(config *config.ElasticConfig) (*Client, error) + 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