elasticsearch

package
Version: 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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigParserES6

func ConfigParserES6(conf interface{}) es6.Config

ConfigParserES6 config parser for elastic search 6

func ConfigParserES7

func ConfigParserES7(conf interface{}) es7.Config

ConfigParserES7 config parser for elastic search 7

func ConfigParserES8

func ConfigParserES8(conf interface{}) es8.Config

ConfigParserES8 config parser for elastic search 8

func NewIndexer

func NewIndexer(version ESVersion, cfg interface{}) (adapter.IIndexerEngine, error)

NewIndexer new Elastic Search Indexer

func NewIndexerES6

func NewIndexerES6(cfg es6.Config) (adapter.IIndexerEngine, error)

NewIndexerES6 new Elastic Search 6 Indexer

func NewIndexerES7

func NewIndexerES7(cfg es7.Config) (adapter.IIndexerEngine, error)

NewIndexerES7 new Elastic Search 7 Indexer

func NewIndexerES8

func NewIndexerES8(cfg es8.Config) (adapter.IIndexerEngine, error)

NewIndexerES8 new Elastic Search 8 Indexer

Types

type ESVersion

type ESVersion string

ESVersion represent Elastic Version Type

const (
	ESVersion6 ESVersion = "6"
	ESVersion7 ESVersion = "7"
	ESVersion8 ESVersion = "8"
)

type Indexer

type Indexer struct {
	// contains filtered or unexported fields
}

Indexer type

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{}

GetEngine get Indexer Engine

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 IndexerES6

type IndexerES6 struct {
	// contains filtered or unexported fields
}

IndexerES6 type

func (*IndexerES6) CreateDoc

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

func (*IndexerES6) CreateIndex

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

func (*IndexerES6) DeleteDoc

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

func (*IndexerES6) DocExist

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

func (*IndexerES6) DropIndex

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

func (*IndexerES6) GetDoc

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

func (*IndexerES6) GetEngine

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

GetEngine get Indexer Engine

func (*IndexerES6) IndexExist

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

func (*IndexerES6) Search

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

func (*IndexerES6) SearchIndexDoc

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

func (*IndexerES6) UpdateDoc

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

type IndexerES7

type IndexerES7 struct {
	// contains filtered or unexported fields
}

IndexerES7 type

func (*IndexerES7) CreateDoc

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

func (*IndexerES7) CreateIndex

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

func (*IndexerES7) DeleteDoc

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

func (*IndexerES7) DocExist

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

func (*IndexerES7) DropIndex

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

func (*IndexerES7) GetDoc

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

func (*IndexerES7) GetEngine

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

GetEngine get Indexer Engine

func (*IndexerES7) IndexExist

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

func (*IndexerES7) Search

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

func (*IndexerES7) SearchIndexDoc

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

func (*IndexerES7) UpdateDoc

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

type IndexerES8

type IndexerES8 struct {
	// contains filtered or unexported fields
}

IndexerES8 type

func (*IndexerES8) CreateDoc

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

func (*IndexerES8) CreateIndex

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

func (*IndexerES8) DeleteDoc

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

func (*IndexerES8) DocExist

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

func (*IndexerES8) DropIndex

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

func (*IndexerES8) GetDoc

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

func (*IndexerES8) GetEngine

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

GetEngine get Indexer Engine

func (*IndexerES8) IndexExist

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

func (*IndexerES8) Search

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

func (*IndexerES8) SearchIndexDoc

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

func (*IndexerES8) UpdateDoc

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

Jump to

Keyboard shortcuts

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