elastic_gopher

package module
v0.0.0-...-292d223 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2017 License: MIT Imports: 5 Imported by: 0

README

MIT licensed Build Status Coverage Status GoDoc

DEPRECATED

See https://github.com/b3ntly/elasticsearch. This repository will be taken down in the near future.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Index

type Index struct {
	Session *Session

	Err error
	// contains filtered or unexported fields
}

func (*Index) Drop

func (idx *Index) Drop() (error, bool)

func (*Index) Search

func (idx *Index) Search(queryString string) ([]*Result, error)

func (*Index) T

func (idx *Index) T(name string) *Type

type Options

type Options struct {
	Url     string
	Elastic *elastic.Client
}

Options allows the use to customize the underlying elasticsearch client

type Result

type Result struct {
	Id       string
	Document *json.RawMessage
}

type Session

type Session struct {
	Elastic *elastic.Client
	// contains filtered or unexported fields
}

func New

func New(options *Options) (*Session, error)

func (*Session) I

func (s *Session) I(name string) *Index

type Type

type Type struct {
	Index *Index
	// contains filtered or unexported fields
}

func (*Type) BulkInsert

func (t *Type) BulkInsert(docs []interface{}) ([]string, error)

func (*Type) Count

func (t *Type) Count() (int64, error)

func (*Type) DeleteById

func (t *Type) DeleteById(id string) (error, bool)

func (*Type) Find

func (t *Type) Find() ([]*Result, error)

func (*Type) FindById

func (t *Type) FindById(id string) (*Result, error)

func (*Type) Insert

func (t *Type) Insert(doc interface{}) (string, error)

func (*Type) UpdateById

func (t *Type) UpdateById(id string, doc interface{}) (error, bool)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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