Documentation
¶
Index ¶
- Constants
- type BulkRequest
- type Client
- func (c *Client) Bulk(items []*BulkRequest) (*elastic.BulkResponse, error)
- func (c *Client) Do(bulk *elastic.BulkService) (*elastic.BulkResponse, error)
- func (c *Client) DoBulk(bulk *elastic.BulkService, items []*BulkRequest) (*elastic.BulkResponse, error)
- func (c *Client) PrepareIndex(reqs []*BulkRequest, indexs []string) ([]*BulkRequest, error)
- func (c *Client) PrepareOfflineIndex(reqs []*BulkRequest, indexs []string) ([]*BulkRequest, error)
- type Response
- type ResponseItem
Constants ¶
View Source
const ( ActionCreate = "create" ActionUpdate = "update" ActionDelete = "delete" ActionIndex = "index" )
See http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/bulk.html
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BulkRequest ¶
type Client ¶
type Client struct { Seelog *mainlog.LoggerInterface // contains filtered or unexported fields }
Although there are many Elasticsearch clients with Go, I still want to implement one by myself. Because we only need some very simple usages.
func (*Client) Bulk ¶
func (c *Client) Bulk(items []*BulkRequest) (*elastic.BulkResponse, error)
main es Bulk api only support parent in 'Bulk' related apis
func (*Client) DoBulk ¶
func (c *Client) DoBulk(bulk *elastic.BulkService, items []*BulkRequest) (*elastic.BulkResponse, error)
func (*Client) PrepareIndex ¶
func (c *Client) PrepareIndex(reqs []*BulkRequest, indexs []string) ([]*BulkRequest, error)
stock sku == es index id
func (*Client) PrepareOfflineIndex ¶
func (c *Client) PrepareOfflineIndex(reqs []*BulkRequest, indexs []string) ([]*BulkRequest, error)
t_pro_sell id === ESindex's pid
type Response ¶
type Response struct { Code int ResponseItem }
Click to show internal directories.
Click to hide internal directories.