Documentation ¶
Overview ¶
Package v8 provides Elasticsearch version 8 client implementations.
Index ¶
- type Client
- func (this *Client) Delete(index, documentID string) error
- func (this *Client) DeleteByQuery(indices []string, body string) error
- func (this *Client) Exists(index, documentID string) (bool, error)
- func (this *Client) Index(index, documentID, body string) error
- func (this *Client) IndicesCreate(index, body string) error
- func (this *Client) IndicesDelete(indices []string) error
- func (this *Client) IndicesDeleteTemplate(name string) error
- func (this *Client) IndicesExists(indices []string) (bool, error)
- func (this *Client) IndicesExistsTemplate(name []string) (bool, error)
- func (this *Client) IndicesForcemerge(indices []string) error
- func (this *Client) IndicesPutTemplate(name, body string) error
- func (this *Client) Initialize(addresses []string, timeout time.Duration, ...) error
- func (this *Client) Search(index, body string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a struct that provides client related methods.
func (*Client) Delete ¶
Delete is deletes document.
ex) err := client.Delete("index", "document_id")
func (*Client) DeleteByQuery ¶
DeleteByQuery is perform a delete query on index.
ex) err := client.DeleteByQuery([]string{"index"},"{...}")
func (*Client) Exists ¶
Exists is checks if a document exists in the index.
ex) exist, err := client.Exists("index", "document_id")
func (*Client) Index ¶
Index is stores document.
ex) err := client.Index("index", "document_id", "{...}")
func (*Client) IndicesCreate ¶
IndicesCreate is create an index.
ex) err := client.IndicesCreate("index", "{...}")
func (*Client) IndicesDelete ¶
IndicesDelete is delete an index.
ex) err := client.IndicesDelete([]string{"Index"})
func (*Client) IndicesDeleteTemplate ¶
IndicesDeleteTemplate is delete an template.
ex) err := client.IndicesDeleteTemplate("template")
func (*Client) IndicesExists ¶
IndicesExists is checks if an index exists within indices.
ex) exist, err := client.IndicesExists([]string{"index"})
func (*Client) IndicesExistsTemplate ¶
IndicesExistsTemplate is checks if a template exists.
ex) exist, err := client.IndicesExistsTemplate([]string{"template"})
func (*Client) IndicesForcemerge ¶
IndicesForcemerge is perform a force merge on index.
ex) err := client.IndicesForcemerge([]string{"index"})
func (*Client) IndicesPutTemplate ¶
IndicesPutTemplate is stores templates.
ex) err := client.IndicesPutTemplate("template", "{...}")
func (*Client) Initialize ¶
func (this *Client) Initialize(addresses []string, timeout time.Duration, cloudID, apiKey, username, password, certificateFingerprint string, caCert []byte) error
Initialize is initialize.
ex) err := client.Initialize([]string{"127.0.0.1:9200"}, 60, "", "", "", "", "", []byte(""))