adapter

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IEOptions

type IEOptions struct {
	// Name of Engine adapter. Default is "IEElasticSearch (elastic search)".
	Engine  IEType
	Version string
	// Options denpent on Engine (elasticsearch options, ... options)
	Options interface{}
}

IEOptions represent Indexer Engine Options

type IEType

type IEType string

IEType Indexer Engine Type

const (
	// IEElasticSearch Elastic Search Indexer Engine
	IEElasticSearch IEType = "elasticsearch"
)

type IIndexerEngine

type IIndexerEngine interface {
	GetEngine() interface{}

	Search(query io.Reader, prettify bool) ([]byte, error)
	SearchIndexDoc(index string, query io.Reader, size int, prettify bool) ([]byte, error)

	IndexExist(indexs []string) (bool, error)
	CreateIndex(index string, mapping io.Reader) error
	DropIndex(indexs []string) error

	DocExist(index string, id string) (bool, error)
	CreateDoc(index string, id string, body io.Reader) error
	GetDoc(index string, id string) ([]byte, error)
	UpdateDoc(index string, id string, body io.Reader) error
	DeleteDoc(index string, id string) error
}

IIndexerEngine contract/interface for IndexerEngine

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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