Versions in this module Expand all Collapse all v0 v0.1.0 Jun 23, 2021 Changes in this version + func RegisterInstance(elastic string, cfg ElasticsearchConfig, handler API) + type API interface + Bulk func(data *bytes.Buffer) + ClusterHealth func() *ClusterHealth + ClusterVersion func() *ClusterVersion + Count func(indexName string) (*CountResponse, error) + CreateIndex func(name string, settings map[string]interface{}) error + Delete func(indexName, id string) (*DeleteResponse, error) + DeleteIndex func(name string) error + Get func(indexName, id string) (*GetResponse, error) + GetIndexSettings func(indexNames string) (*Indexes, error) + Index func(indexName string, id interface{}, data interface{}) (*InsertResponse, error) + IndexExists func(indexName string) (bool, error) + Init func() + Refresh func(name string) (err error) + Search func(indexName string, query *SearchRequest) (*SearchResponse, error) + SearchWithRawQueryDSL func(indexName string, queryDSL []byte) (*SearchResponse, error) + UpdateIndexSettings func(indexName string, settings map[string]interface{}) error + func GetClient(k string) API + type Aggregation struct + type AggregationRequest struct + Aggregations map[string]Aggregation + type AggregationResponse struct + Buckets []Bucket + type BoolQuery struct + Must []interface{} + MustNot []interface{} + Should []interface{} + type Bucket struct + DocCount int + Key string + type ClusterHealth struct + Name string + Status string + type ClusterVersion struct + ClusterName string + Name string + Version struct{ ... } + func (c *ClusterVersion) GetMajorVersion() int + type CountResponse struct + Count int + type DeleteResponse struct + ID string + Index string + Result string + Type string + Version int + type ElasticsearchConfig struct + BasicAuth ... + Enabled bool + Endpoint string + HttpProxy string + ID string + IndexPrefix string + Name string + TemplateName string + func GetConfig(k string) ElasticsearchConfig + type GetResponse struct + Found bool + ID string + Index string + Source map[string]interface{} + Type string + Version int + type IndexDocument struct + Highlight map[string][]interface{} + ID interface{} + Index string + Routing string + Source map[string]interface{} + Type string + type Indexes map[string]interface + type InsertResponse struct + ID string + Index string + Result string + Type string + Version int + type MappingAPI interface + GetMapping func(copyAllIndexes bool, indexNames string) (string, int, *Indexes, error) + UpdateMapping func(indexName string, mappings []byte) ([]byte, error) + type MatchQuery struct + Match map[string]interface{} + func (match *MatchQuery) Set(field string, v interface{}) + type Query struct + BoolQuery *BoolQuery + type QueryStringQuery struct + Query map[string]interface{} + func NewQueryString(q string) *QueryStringQuery + func (query *QueryStringQuery) DefaultOperator(op string) + func (query *QueryStringQuery) Fields(fields ...string) + func (query *QueryStringQuery) QueryString(q string) + type RangeQuery struct + Range map[string]map[string]interface{} + func (query *RangeQuery) Gt(field string, value interface{}) + func (query *RangeQuery) Gte(field string, value interface{}) + func (query *RangeQuery) Lt(field string, value interface{}) + func (query *RangeQuery) Lte(field string, value interface{}) + type ScrollAPI interface + NewScroll func(indexNames string, scrollTime string, docBufferCount int, query string, ...) (interface{}, error) + NextScroll func(scrollTime string, scrollId string) (interface{}, error) + type ScrollResponse struct + Hits struct{ ... } + ScrollId string + Shards ShardResponse + TimedOut bool + Took int + func (scroll *ScrollResponse) GetDocs() []interface{} + func (scroll *ScrollResponse) GetHitsTotal() int + func (scroll *ScrollResponse) GetScrollId() string + func (scroll *ScrollResponse) GetShardResponse() ShardResponse + func (scroll *ScrollResponse) SetScrollId(id string) + type ScrollResponseAPI interface + GetDocs func() []interface{} + GetHitsTotal func() int + GetScrollId func() string + GetShardResponse func() ShardResponse + SetScrollId func(id string) + type ScrollResponseV7 struct + Hits struct{ ... } + func (scroll *ScrollResponseV7) GetDocs() []interface{} + func (scroll *ScrollResponseV7) GetHitsTotal() int + func (scroll *ScrollResponseV7) GetScrollId() string + func (scroll *ScrollResponseV7) GetShardResponse() ShardResponse + func (scroll *ScrollResponseV7) SetScrollId(id string) + type SearchRequest struct + From int + Query *Query + Size int + Sort *[]interface{} + func (request *SearchRequest) AddSort(field string, order string) + type SearchResponse struct + Aggregations map[string]AggregationResponse + Hits struct{ ... } + TimedOut bool + Took int + func (response *SearchResponse) GetTotal() int + type ShardResponse struct + Failed int + Failures []struct{ ... } + Skipped int + Successful int + Total int + type TemplateAPI interface + PutTemplate func(templateName string, template []byte) ([]byte, error) + TemplateExists func(templateName string) (bool, error) + type TermsAggregationQuery struct + func NewTermsAggregation() (query *TermsAggregationQuery) + func (query *TermsAggregationQuery) Field(field string) *TermsAggregationQuery + func (query *TermsAggregationQuery) Size(size int) *TermsAggregationQuery