Versions in this module Expand all Collapse all v0 v0.2.3 Jun 11, 2021 v0.2.2 May 30, 2021 v0.2.1 May 29, 2021 v0.2.0 May 23, 2021 v0.1.9 May 22, 2021 Changes in this version + const EXISTS type QueryCond + Children []QueryCond v0.1.8 May 5, 2021 v0.1.7 Apr 22, 2021 v0.1.6 Apr 22, 2021 v0.1.5 Apr 22, 2021 v0.1.4 Apr 20, 2021 v0.1.3 Apr 18, 2021 Changes in this version + const BOOL + const DATE + const DOUBLE + const FLOAT + const INTEGER + const KEYWORD + const LONG + const MATCHPHRASE + const MUST + const MUSTNOT + const PREFIX + const RANGE + const SHORT + const SHOULD + const TERMS + const TEXT + const WILDCARD + var G_EsClient *elastic.Client + func BulkDelete(esindex, estype string, ids []string) error + func BulkSaveOrUpdate(esindex, estype string, docs []map[string]interface{}) error + func CheckTypeExists(esindex, estype string) (b bool, err error) + func ClearIndex(index string) error + func Count(paging *Paging, esIndex string, esType string) (int64, error) + func DeleteIndex(index string) error + func GetByID(id string, esIndex string, esType string) (map[string]interface{}, error) + func InitG_EsClient(hosts []string, username, password string) + func List(paging *Paging, esIndex string, esType string, ...) ([]interface{}, error) + func NewIndex(index string, mapping string) (exists bool, err error) + func NewMapping(mp MappingPayload) string + func PutMapping(mp MappingPayload) error + func Random(paging *Paging, esIndex string, esType string) ([]interface{}, error) + func SetupSubTest(index string, t *testing.T) func(t *testing.T) + func Stat(paging *Paging, esIndex string, esType string, aggr interface{}) (interface{}, error) + type Base struct + Index string + Type string + func (b *Base) GetIndex() string + func (b *Base) GetType() string + func (b *Base) SetType(s string) + type Field struct + Format string + Name string + Type esFieldType + type IBase interface + GetIndex func() string + GetType func() string + SetType func(s string) + type MappingPayload struct + Fields []Field + type PageResult struct + Docs []interface{} + HasNextPage bool + Page int + PageSize int + Total int + func Page(paging *Paging, esIndex string, esType string) (PageResult, error) + type Paging struct + DateField string + EndDate string + Limit int + QueryConds []QueryCond + Skip int + Sortby []Sort + StartDate string + type QueryCond struct + Pair map[string][]interface{} + QueryLogic queryLogic + QueryType queryType + type Sort struct + Ascending bool + Field string