elastic

package
v0.0.0-...-77bdb4f Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptyID = errors.New("Invalid ID data")

ErrEmptyID declares error for invalid ID

View Source
var ErrNotAcknowledged = errors.New("Create index not acknowledged")

ErrNotAcknowledged declares error for not acknowledged index

View Source
var ErrUnsupported = errors.New("Unsupported method for ElasticSearch v5")

ErrUnsupported declares error for unsupported methods

Functions

This section is empty.

Types

type Elastic

type Elastic struct {
	*es.BulkProcessor
	// contains filtered or unexported fields
}

Elastic driver

func New

func New(
	host string, port uint64, renderMap *mapping.RenderMap,
	columns, extras, indices, spec mapping.Fields, idName, atName string,
) (db *Elastic, err error)

New creates Elastic driver

func (*Elastic) AddFromSQL

func (db *Elastic) AddFromSQL(document string, columns []string, values []interface{}) (last uint64, err error)

AddFromSQL implements interface for inserting data from SQL into ElasticSearch

func (*Elastic) Close

func (db *Elastic) Close() (err error)

Close flushes data

func (*Elastic) Cursor

func (db *Elastic) Cursor(
	document string, renderMap *mapping.RenderMap, columns []string, values []interface{},
) (last uint64, err error)

Cursor sets pointer

func (*Elastic) LastID

func (db *Elastic) LastID(document string) (id uint64, err error)

LastID implements interface for getting last ID in datastore document

Jump to

Keyboard shortcuts

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