adapter

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const TypeName6 = "doc"
View Source
const TypeName7 = "_doc"

Variables

This section is empty.

Functions

Types

type ESAPIV0

type ESAPIV0 struct {
	Version elastic.ClusterVersion
	Config  elastic.ElasticsearchConfig
}

func (*ESAPIV0) Bulk

func (c *ESAPIV0) Bulk(data *bytes.Buffer)

func (*ESAPIV0) ClusterHealth

func (c *ESAPIV0) ClusterHealth() *elastic.ClusterHealth

func (*ESAPIV0) ClusterVersion

func (c *ESAPIV0) ClusterVersion() *elastic.ClusterVersion

func (*ESAPIV0) Count

func (c *ESAPIV0) Count(indexName string) (*elastic.CountResponse, error)

Count used to count how many docs in one index

func (*ESAPIV0) CreateIndex

func (c *ESAPIV0) CreateIndex(indexName string, settings map[string]interface{}) (err error)

func (*ESAPIV0) Delete

func (c *ESAPIV0) Delete(indexName, id string) (*elastic.DeleteResponse, error)

Delete used to delete document by id

func (*ESAPIV0) DeleteIndex

func (c *ESAPIV0) DeleteIndex(indexName string) (err error)

func (*ESAPIV0) Get

func (c *ESAPIV0) Get(indexName, id string) (*elastic.GetResponse, error)

Get fetch document by id

func (*ESAPIV0) GetIndexSettings

func (c *ESAPIV0) GetIndexSettings(indexNames string) (*elastic.Indexes, error)

func (*ESAPIV0) GetMapping

func (c *ESAPIV0) GetMapping(copyAllIndexes bool, indexNames string) (string, int, *elastic.Indexes, error)

func (*ESAPIV0) Index

func (c *ESAPIV0) Index(indexName string, id interface{}, data interface{}) (*elastic.InsertResponse, error)

Index index a document into elasticsearch

func (*ESAPIV0) IndexExists

func (c *ESAPIV0) IndexExists(indexName string) (bool, error)

func (*ESAPIV0) Init

func (c *ESAPIV0) Init()

func (*ESAPIV0) NewScroll

func (s *ESAPIV0) NewScroll(indexNames string, scrollTime string, docBufferCount int, query string, slicedId, maxSlicedCount int, fields string) (scroll interface{}, err error)

func (*ESAPIV0) NextScroll

func (s *ESAPIV0) NextScroll(scrollTime string, scrollId string) (interface{}, error)

func (*ESAPIV0) PutTemplate

func (c *ESAPIV0) PutTemplate(templateName string, template []byte) ([]byte, error)

func (*ESAPIV0) Refresh

func (s *ESAPIV0) Refresh(name string) (err error)

func (*ESAPIV0) Request

func (c *ESAPIV0) Request(method, url string, body []byte) (result *util.Result, err error)

func (*ESAPIV0) Search

func (c *ESAPIV0) Search(indexName string, query *elastic.SearchRequest) (*elastic.SearchResponse, error)

Search used to execute a search query

func (*ESAPIV0) SearchWithRawQueryDSL

func (c *ESAPIV0) SearchWithRawQueryDSL(indexName string, queryDSL []byte) (*elastic.SearchResponse, error)

func (*ESAPIV0) TemplateExists

func (c *ESAPIV0) TemplateExists(templateName string) (bool, error)

func (*ESAPIV0) UpdateIndexSettings

func (s *ESAPIV0) UpdateIndexSettings(name string, settings map[string]interface{}) error

func (*ESAPIV0) UpdateMapping

func (s *ESAPIV0) UpdateMapping(indexName string, mappings []byte) ([]byte, error)

type ESAPIV5

type ESAPIV5 struct {
	ESAPIV0
}

func (*ESAPIV5) Bulk

func (s *ESAPIV5) Bulk(data *bytes.Buffer)

func (*ESAPIV5) ClusterHealth

func (s *ESAPIV5) ClusterHealth() *elastic.ClusterHealth

func (*ESAPIV5) CreateIndex

func (s *ESAPIV5) CreateIndex(name string, settings map[string]interface{}) (err error)

func (*ESAPIV5) DeleteIndex

func (s *ESAPIV5) DeleteIndex(name string) (err error)

func (*ESAPIV5) GetIndexSettings

func (s *ESAPIV5) GetIndexSettings(indexNames string) (*elastic.Indexes, error)

func (*ESAPIV5) GetMapping

func (s *ESAPIV5) GetMapping(copyAllIndexes bool, indexNames string) (string, int, *elastic.Indexes, error)

func (*ESAPIV5) Init

func (c *ESAPIV5) Init()

func (*ESAPIV5) NewScroll

func (s *ESAPIV5) NewScroll(indexNames string, scrollTime string, docBufferCount int, query string, slicedId, maxSlicedCount int, fields string) (scroll interface{}, err error)

func (*ESAPIV5) NextScroll

func (s *ESAPIV5) NextScroll(scrollTime string, scrollId string) (interface{}, error)

func (*ESAPIV5) PutTemplate

func (s *ESAPIV5) PutTemplate(templateName string, template []byte) ([]byte, error)

func (*ESAPIV5) Refresh

func (s *ESAPIV5) Refresh(name string) (err error)

func (*ESAPIV5) TemplateExists

func (s *ESAPIV5) TemplateExists(templateName string) (bool, error)

func (*ESAPIV5) UpdateIndexSettings

func (s *ESAPIV5) UpdateIndexSettings(indexName string, settings map[string]interface{}) error

func (*ESAPIV5) UpdateMapping

func (s *ESAPIV5) UpdateMapping(indexName string, mappings []byte) ([]byte, error)

type ESAPIV6

type ESAPIV6 struct {
	ESAPIV5
}

func (*ESAPIV6) Init

func (c *ESAPIV6) Init()

type ESAPIV7

type ESAPIV7 struct {
	ESAPIV6
}

func (*ESAPIV7) Delete

func (c *ESAPIV7) Delete(indexName, id string) (*elastic.DeleteResponse, error)

Delete used to delete document by id

func (*ESAPIV7) Get

func (c *ESAPIV7) Get(indexName, id string) (*elastic.GetResponse, error)

Get fetch document by id

func (*ESAPIV7) Index

func (c *ESAPIV7) Index(indexName string, id interface{}, data interface{}) (*elastic.InsertResponse, error)

IndexDoc index a document into elasticsearch

func (*ESAPIV7) Init

func (c *ESAPIV7) Init()

func (*ESAPIV7) NewScroll

func (c *ESAPIV7) NewScroll(indexNames string, scrollTime string, docBufferCount int, query string, slicedId, maxSlicedCount int, fields string) (scroll interface{}, err error)

func (*ESAPIV7) NextScroll

func (c *ESAPIV7) NextScroll(scrollTime string, scrollId string) (interface{}, error)

func (*ESAPIV7) UpdateMapping

func (c *ESAPIV7) UpdateMapping(indexName string, mappings []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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