Documentation ¶
Index ¶
- Constants
- Variables
- 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
- type Field
- type IBase
- type MappingPayload
- type PageResult
- type Paging
- type QueryCond
- type Sort
Constants ¶
View Source
const ( SHOULD queryLogic = iota + 1 MUST MUSTNOT )
View Source
const ( TERMS queryType = iota + 1 MATCHPHRASE RANGE PREFIX WILDCARD )
View Source
const ( TEXT esFieldType = "text" KEYWORD esFieldType = "keyword" DATE esFieldType = "date" LONG esFieldType = "long" INTEGER esFieldType = "integer" SHORT esFieldType = "short" DOUBLE esFieldType = "double" FLOAT esFieldType = "float" BOOL esFieldType = "boolean" )
Variables ¶
View Source
var G_EsClient *elastic.Client
Functions ¶
func BulkDelete ¶
func BulkSaveOrUpdate ¶
func CheckTypeExists ¶
func ClearIndex ¶
func DeleteIndex ¶
func InitG_EsClient ¶
func NewMapping ¶
func NewMapping(mp MappingPayload) string
func PutMapping ¶
func PutMapping(mp MappingPayload) error
Types ¶
type MappingPayload ¶
type PageResult ¶
Click to show internal directories.
Click to hide internal directories.