elasticsearch

package module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2020 License: MIT Imports: 6 Imported by: 2

README

elasticsearch

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EsClient

type EsClient struct {
	*es.Client
	// contains filtered or unexported fields
}

func CreateEsClient

func CreateEsClient(hosts []string) (EsClient, error)

func (EsClient) BulkInsert

func (ec EsClient) BulkInsert(index string, typ string, arr []interface{}) error

func (EsClient) CreateEsIndex

func (ec EsClient) CreateEsIndex(index string, shardNum int32, replicaNum int32, refreshInterval int32) error

func (EsClient) DeleteEsIndex

func (ec EsClient) DeleteEsIndex(index string) error

func (EsClient) Insert

func (ec EsClient) Insert(index string, typ string, msg interface{}) error

InsertWithDocId 插入@msg !!! 如果@msg的类型是string 或者 []byte,则被当做Json String类型直接存进去

func (EsClient) InsertWithDocId

func (ec EsClient) InsertWithDocId(index string, typ string, docID string, msg interface{}) error

type EsClientV3

type EsClientV3 struct {
	*es.Client
	// contains filtered or unexported fields
}

func CreateEsClientV3

func CreateEsClientV3(hosts []string) (EsClientV3, error)

func (EsClientV3) BulkInsert

func (ec EsClientV3) BulkInsert(index string, typ string, arr []interface{}) error

func (EsClientV3) CreateEsIndex

func (ec EsClientV3) CreateEsIndex(index string, shardNum int32, replicaNum int32, refreshInterval int32) error

func (EsClientV3) DeleteEsIndex

func (ec EsClientV3) DeleteEsIndex(index string) error

func (EsClientV3) Insert

func (ec EsClientV3) Insert(index string, typ string, msg interface{}) error

InsertWithDocId 插入@msg !!! 如果@msg的类型是string 或者 []byte,则被当做Json String类型直接存进去

func (EsClientV3) InsertWithDocId

func (ec EsClientV3) InsertWithDocId(index string, typ string, docID string, msg interface{}) error

type EsClientV5

type EsClientV5 struct {
	*es.Client
	// contains filtered or unexported fields
}

func CreateEsClientV5

func CreateEsClientV5(hosts []string) (EsClientV5, error)

func (EsClientV5) BulkInsert

func (ec EsClientV5) BulkInsert(index string, typ string, arr []interface{}) error

func (EsClientV5) CreateEsIndex

func (ec EsClientV5) CreateEsIndex(index string, shardNum int32, replicaNum int32, refreshInterval int32) error

func (EsClientV5) DeleteEsIndex

func (ec EsClientV5) DeleteEsIndex(index string) error

func (EsClientV5) Insert

func (ec EsClientV5) Insert(index string, typ string, msg interface{}) error

InsertWithDocId 插入@msg !!! 如果@msg的类型是string 或者 []byte,则被当做Json String类型直接存进去

func (EsClientV5) InsertWithDocId

func (ec EsClientV5) InsertWithDocId(index string, typ string, docID string, msg interface{}) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL