Documentation ¶
Index ¶
- func CheckAndCreate(index string, bodyString string) (cIndex *elastic.IndicesCreateResult, err error)
- func CheckAndDelete(index string) (dIndex *elastic.IndicesDeleteResponse, err error)
- func Index(idx string, docs []Document) error
- func Init(hosts []string, enableAuth bool, username, password string) (err error)
- func UpdateSettings(index string, setting map[string]interface{}) (uIndex *elastic.IndicesPutSettingsResponse, err error)
- type Document
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckAndCreate ¶
func CheckAndCreate(index string, bodyString string) (cIndex *elastic.IndicesCreateResult, err error)
CheckAndCreate creates index if not exists
func CheckAndDelete ¶
func CheckAndDelete(index string) (dIndex *elastic.IndicesDeleteResponse, err error)
CheckAndDelete deletes index if exists
func UpdateSettings ¶
func UpdateSettings(index string, setting map[string]interface{}) (uIndex *elastic.IndicesPutSettingsResponse, err error)
UpdateSettings update index settings
Types ¶
Click to show internal directories.
Click to hide internal directories.