v8

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package v8 provides Elasticsearch version 8 client implementations.

Index

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

func (this *Client) Delete(index, documentID string) error

Delete is deletes document.

ex) err := client.Delete("index", "document_id")

func (*Client) DeleteByQuery

func (this *Client) DeleteByQuery(indices []string, body string) error

DeleteByQuery is perform a delete query on index.

ex) err := client.DeleteByQuery([]string{"index"},"{...}")

func (*Client) Exists

func (this *Client) Exists(index, documentID string) (bool, error)

Exists is checks if a document exists in the index.

ex) exist, err := client.Exists("index", "document_id")

func (*Client) Index

func (this *Client) Index(index, documentID, body string) error

Index is stores document.

ex) err := client.Index("index", "document_id", "{...}")

func (*Client) IndicesCreate

func (this *Client) IndicesCreate(index, body string) error

IndicesCreate is create an index.

ex) err := client.IndicesCreate("index", "{...}")

func (*Client) IndicesDelete

func (this *Client) IndicesDelete(indices []string) error

IndicesDelete is delete an index.

ex) err := client.IndicesDelete([]string{"Index"})

func (*Client) IndicesDeleteTemplate

func (this *Client) IndicesDeleteTemplate(name string) error

IndicesDeleteTemplate is delete an template.

ex) err := client.IndicesDeleteTemplate("template")

func (*Client) IndicesExists

func (this *Client) IndicesExists(indices []string) (bool, error)

IndicesExists is checks if an index exists within indices.

ex) exist, err := client.IndicesExists([]string{"index"})

func (*Client) IndicesExistsTemplate

func (this *Client) IndicesExistsTemplate(name []string) (bool, error)

IndicesExistsTemplate is checks if a template exists.

ex) exist, err := client.IndicesExistsTemplate([]string{"template"})

func (*Client) IndicesForcemerge

func (this *Client) IndicesForcemerge(indices []string) error

IndicesForcemerge is perform a force merge on index.

ex) err := client.IndicesForcemerge([]string{"index"})

func (*Client) IndicesPutTemplate

func (this *Client) IndicesPutTemplate(name, body string) error

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(""))

func (*Client) Search

func (this *Client) Search(index, body string) (string, error)

Search is search

ex) result, err := client.Search("index", "{...}")

Jump to

Keyboard shortcuts

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