elastic

package module
v1.0.15 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2020 License: MIT Imports: 9 Imported by: 0

README

elastic

Abstraction of official elasticsearch driver

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	ES *elasticsearch.Client
}

Client - Elastic client object

func Create

func Create(co ClientOptions) Client

Create - Create Elastic client object

func (*Client) CreateIndex added in v1.0.11

func (clnt *Client) CreateIndex(index string, body string)

func (*Client) IndexMany

func (clnt *Client) IndexMany(index string, jsonArr []string, indexKey string)

IndexMany - index one or many documents

func (*Client) IndexOne added in v1.0.14

func (clnt *Client) IndexOne(index string, doc string, indexKey string)

func (*Client) MapIndexs added in v1.0.4

func (clnt *Client) MapIndexs(m []map[string]string)

func (*Client) Search

func (clnt *Client) Search(index string, query string) []map[string]interface{}

type ClientOptions

type ClientOptions struct {
	URI string
}

ClientOptions - connection settings and options for elasticsearch

Jump to

Keyboard shortcuts

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