v0.2.2 Latest Latest

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

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




This section is empty.


This section is empty.


This section is empty.


type Indexer

type Indexer struct {
	Context   string
	Container string
	Component string
	// contains filtered or unexported fields

Indexer type

func NewIndexer

func NewIndexer(indexerType IndexerType, indexerEngine adapter.IIndexerEngine) (*Indexer, error)

func (*Indexer) CreateDoc

func (i *Indexer) CreateDoc(index string, id string, body io.Reader) error

func (*Indexer) CreateIndex

func (i *Indexer) CreateIndex(index string, mapping io.Reader) error

func (*Indexer) DeleteDoc

func (i *Indexer) DeleteDoc(index string, id string) error

func (*Indexer) DocExist

func (i *Indexer) DocExist(index string, id string) (bool, error)

func (*Indexer) DropIndex

func (i *Indexer) DropIndex(indexs []string) error

func (*Indexer) GetDoc

func (i *Indexer) GetDoc(index string, id string) ([]byte, error)

func (*Indexer) GetEngine

func (i *Indexer) GetEngine() interface{}

func (*Indexer) IndexExist

func (i *Indexer) IndexExist(indexs []string) (bool, error)

func (*Indexer) Search

func (i *Indexer) Search(query io.Reader, prettify bool) ([]byte, error)

func (*Indexer) SearchIndexDoc

func (i *Indexer) SearchIndexDoc(index string, query io.Reader, size int, prettify bool) ([]byte, error)

func (*Indexer) UpdateDoc

func (i *Indexer) UpdateDoc(index string, id string, body io.Reader) error

type IndexerType

type IndexerType string

IndexerType represent IndexerType

const (
	ElasticSearchIndexer IndexerType = "elasticsearch"

func NewIndexerEngine

func NewIndexerEngine(indexerType IndexerType, ieOptions adapter.IEOptions) (adapter.IIndexerEngine, IndexerType, error)

NewIndexerEngine new IndexerEngine


Path Synopsis

Jump to

Keyboard shortcuts

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