elasticsearch

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2019 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStatus added in v1.0.0

func GetStatus() ([]byte, error)

func MultiSearch added in v1.0.0

func MultiSearch(index string, docType string, request []byte) ([]byte, error)
func Search(index string, docType string, request []byte) ([]byte, error)

func Setup added in v1.0.0

func Setup(url string)

Setup initialises the elasticsearch ,module with a url, stripping any trailing slashes

Types

type Client

type Client struct {
	URL string
}

Client provides methods to wrap around the elastcsearch package in order to facilitate unit testing

func New

func New(URL string) *Client

New creates a new elasticsearch client

func (*Client) MultiSearch

func (cli *Client) MultiSearch(index string, docType string, request []byte) ([]byte, error)

MultiSearch is a method that wraps the MultiSearch function of the elasticsearch package

func (*Client) Search

func (cli *Client) Search(index string, docType string, request []byte) ([]byte, error)

Search is a method that wraps the Search function of the elasticsearch package

Jump to

Keyboard shortcuts

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