Documentation ¶
Index ¶
- type ElasticsearchClient
- func (esClient *ElasticsearchClient) Aggregate(indexName string, group map[string]elastic.Aggregation, filter elastic.Query) (searchResult *elastic.SearchResult, err error)
- func (esClient *ElasticsearchClient) Delete(indexName string, filter *QueryFilter) (count int64, err error)
- func (esClient *ElasticsearchClient) GetMap(indexName string) (mapping string, err error)
- func (esClient *ElasticsearchClient) New() (newClient *ElasticsearchClient, err error)
- func (esClient *ElasticsearchClient) SaveData(indexName string, data []interface{}) (err error)
- func (esClient *ElasticsearchClient) Select(results interface{}, indexName string, filter *QueryFilter, ...) (total int64, err error)
- func (esClient *ElasticsearchClient) SetMap(indexName string, mapping string) (err error)
- func (esClient *ElasticsearchClient) Update(indexName string, filter *QueryFilter, script *elastic.Script) (count int64, err error)
- type ElasticsearchClientConfig
- type ElasticsearchMapping
- type QueryFilter
- type QueryLastSort
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ElasticsearchClient ¶
type ElasticsearchClient struct { *elastic.Client // contains filtered or unexported fields }
func NewElasticsearchClient ¶
func NewElasticsearchClient(conf *ElasticsearchClientConfig) (esClient *ElasticsearchClient, err error)
func (*ElasticsearchClient) Aggregate ¶
func (esClient *ElasticsearchClient) Aggregate(indexName string, group map[string]elastic.Aggregation, filter elastic.Query) (searchResult *elastic.SearchResult, err error)
func (*ElasticsearchClient) Delete ¶
func (esClient *ElasticsearchClient) Delete(indexName string, filter *QueryFilter) (count int64, err error)
func (*ElasticsearchClient) GetMap ¶
func (esClient *ElasticsearchClient) GetMap(indexName string) (mapping string, err error)
func (*ElasticsearchClient) New ¶
func (esClient *ElasticsearchClient) New() (newClient *ElasticsearchClient, err error)
func (*ElasticsearchClient) SaveData ¶
func (esClient *ElasticsearchClient) SaveData(indexName string, data []interface{}) (err error)
func (*ElasticsearchClient) Select ¶
func (esClient *ElasticsearchClient) Select(results interface{}, indexName string, filter *QueryFilter, sort map[string]bool, limit int64, offset int64, lastSort *QueryLastSort) (total int64, err error)
func (*ElasticsearchClient) SetMap ¶
func (esClient *ElasticsearchClient) SetMap(indexName string, mapping string) (err error)
func (*ElasticsearchClient) Update ¶
func (esClient *ElasticsearchClient) Update(indexName string, filter *QueryFilter, script *elastic.Script) (count int64, err error)
type ElasticsearchMapping ¶
type ElasticsearchMapping struct { Settings interface{} `json:"settings"` Mappings interface{} `json:"mappings"` }
type QueryFilter ¶
type QueryFilter struct {
QuerySource interface{}
}
func (*QueryFilter) Source ¶
func (fq *QueryFilter) Source() (interface{}, error)
type QueryLastSort ¶
type QueryLastSort []interface{}
Click to show internal directories.
Click to hide internal directories.