Documentation ¶
Index ¶
- type Config
- type ElasticClient
- func (e *ElasticClient) CreateDocument(index, docID, body string) (err error)
- func (e *ElasticClient) CreateIndex(index, body string) (res *esapi.Response, err error)
- func (e *ElasticClient) DeleteIndex(index []string) (res *esapi.Response, err error)
- func (e *ElasticClient) Qurey(index string, query map[string]interface{}, res interface{}) (err error)
- func (e *ElasticClient) UpdateDocumentByID(index, docID, body string) (err error)
- func (e *ElasticClient) UpdateDocumentByQurey(body string) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ElasticClient ¶
type ElasticClient struct {
// contains filtered or unexported fields
}
func NewElasticsearch ¶
func NewElasticsearch(c *Config) *ElasticClient
func (*ElasticClient) CreateDocument ¶
func (e *ElasticClient) CreateDocument(index, docID, body string) (err error)
func (*ElasticClient) CreateIndex ¶
func (e *ElasticClient) CreateIndex(index, body string) (res *esapi.Response, err error)
func (*ElasticClient) DeleteIndex ¶
func (e *ElasticClient) DeleteIndex(index []string) (res *esapi.Response, err error)
func (*ElasticClient) Qurey ¶
func (e *ElasticClient) Qurey(index string, query map[string]interface{}, res interface{}) (err error)
Qurey query from es .
func (*ElasticClient) UpdateDocumentByID ¶
func (e *ElasticClient) UpdateDocumentByID(index, docID, body string) (err error)
func (*ElasticClient) UpdateDocumentByQurey ¶
func (e *ElasticClient) UpdateDocumentByQurey(body string) (err error)
Click to show internal directories.
Click to hide internal directories.