Documentation ¶
Index ¶
- Constants
- func AnalyzerText(client elastic.Client, content string) ([]string, error)
- func CommonSearch(client *elastic.Client, indexName string, key string, propertyName string, ...) ([]*elastic.SearchHit, error)
- func DeleteData(client *elastic.Client, indexName string, typeName string, id string) (bool, error)
- func DeleteIndex(client *elastic.Client, indexNames []string) (bool, error)
- func GetCount(client *elastic.Client, indexName string) (int, error)
- func GetLLClient() (*elastic.Client, error)
- func GetSLClient() (*elastic.Client, error)
- func InitialESConfig(serverUrls []string, forceReload bool)
- func InsertData(client *elastic.Client, indexName string, typeName string, item interface{}, ...) (bool, string, error)
- func IsIndexExisted(client *elastic.Client, indexName string) (bool, error)
- func NewIndexWithMapping(indexName string, typeName string, mapping string) (bool, error)
- func UpdateMapping(client *elastic.Client, indexName string, typeName string, mapping string) (bool, error)
- type ESConfig
Constants ¶
View Source
const ( IKSmart = "ik_smart" IKMaxWrod = "ik_max_word" )
Variables ¶
This section is empty.
Functions ¶
func AnalyzerText ¶
AnalyzerText will seperate the content into a slice of meaning words with original order in content the default seperate mode is 'ik_smart'
func CommonSearch ¶
func DeleteData ¶
func GetLLClient ¶
GetLLClient returns a long-lived client
func GetSLClient ¶
GetSLClient return a short-lived client
func InitialESConfig ¶
func InsertData ¶
func NewIndexWithMapping ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.