indexer

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2020 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Indexer

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

Indexer type

func NewIndexer

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

NewIndexer create new Indexer

func (*Indexer) CreateDoc

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

CreateDoc represent CreateDoc

func (*Indexer) CreateIndex

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

CreateIndex represent CreateIndex

func (*Indexer) DeleteDoc

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

DeleteDoc represent DeleteDoc

func (*Indexer) DocExist

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

DocExist represent DocExist

func (*Indexer) DropIndex

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

DropIndex represent DropIndex

func (*Indexer) GetDoc

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

GetDoc represent GetDoc

func (*Indexer) GetEngine

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

GetEngine represent GetEngine

func (*Indexer) IndexExist

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

IndexExist represent IndexExist

func (*Indexer) Search

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

Search represent Search

func (*Indexer) SearchIndexDoc

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

SearchIndexDoc represent SearchIndexDoc

func (*Indexer) UpdateDoc

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

UpdateDoc represent UpdateDoc

type TheIndexerType

type TheIndexerType string

TheIndexerType represent TheIndexerType

const (
	// ElasticSearchIndexer represent ElasticSearch Indexer
	ElasticSearchIndexer TheIndexerType = "elasticsearch"
)

func NewIndexerEngine

func NewIndexerEngine(TheIndexerType TheIndexerType, ieOptions adapter.IEOptions) (adapter.IIndexerEngine, TheIndexerType, error)

NewIndexerEngine new IndexerEngine

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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