Documentation ¶
Index ¶
- Constants
- func ClusterVersion(config *elastic.ElasticsearchConfig) (elastic.ClusterVersion, error)
- type ESAPIV0
- func (c *ESAPIV0) Bulk(data *bytes.Buffer)
- func (c *ESAPIV0) ClusterHealth() *elastic.ClusterHealth
- func (c *ESAPIV0) ClusterVersion() *elastic.ClusterVersion
- func (c *ESAPIV0) Count(indexName string) (*elastic.CountResponse, error)
- func (c *ESAPIV0) CreateIndex(indexName string, settings map[string]interface{}) (err error)
- func (c *ESAPIV0) Delete(indexName, id string) (*elastic.DeleteResponse, error)
- func (c *ESAPIV0) DeleteIndex(indexName string) (err error)
- func (c *ESAPIV0) Get(indexName, id string) (*elastic.GetResponse, error)
- func (c *ESAPIV0) GetIndexSettings(indexNames string) (*elastic.Indexes, error)
- func (c *ESAPIV0) GetMapping(copyAllIndexes bool, indexNames string) (string, int, *elastic.Indexes, error)
- func (c *ESAPIV0) Index(indexName string, id interface{}, data interface{}) (*elastic.InsertResponse, error)
- func (c *ESAPIV0) IndexExists(indexName string) (bool, error)
- func (c *ESAPIV0) Init()
- func (s *ESAPIV0) NewScroll(indexNames string, scrollTime string, docBufferCount int, query string, ...) (scroll interface{}, err error)
- func (s *ESAPIV0) NextScroll(scrollTime string, scrollId string) (interface{}, error)
- func (c *ESAPIV0) PutTemplate(templateName string, template []byte) ([]byte, error)
- func (s *ESAPIV0) Refresh(name string) (err error)
- func (c *ESAPIV0) Request(method, url string, body []byte) (result *util.Result, err error)
- func (c *ESAPIV0) Search(indexName string, query *elastic.SearchRequest) (*elastic.SearchResponse, error)
- func (c *ESAPIV0) SearchWithRawQueryDSL(indexName string, queryDSL []byte) (*elastic.SearchResponse, error)
- func (c *ESAPIV0) TemplateExists(templateName string) (bool, error)
- func (s *ESAPIV0) UpdateIndexSettings(name string, settings map[string]interface{}) error
- func (s *ESAPIV0) UpdateMapping(indexName string, mappings []byte) ([]byte, error)
- type ESAPIV5
- func (s *ESAPIV5) Bulk(data *bytes.Buffer)
- func (s *ESAPIV5) ClusterHealth() *elastic.ClusterHealth
- func (s *ESAPIV5) CreateIndex(name string, settings map[string]interface{}) (err error)
- func (s *ESAPIV5) DeleteIndex(name string) (err error)
- func (s *ESAPIV5) GetIndexSettings(indexNames string) (*elastic.Indexes, error)
- func (s *ESAPIV5) GetMapping(copyAllIndexes bool, indexNames string) (string, int, *elastic.Indexes, error)
- func (c *ESAPIV5) Init()
- func (s *ESAPIV5) NewScroll(indexNames string, scrollTime string, docBufferCount int, query string, ...) (scroll interface{}, err error)
- func (s *ESAPIV5) NextScroll(scrollTime string, scrollId string) (interface{}, error)
- func (s *ESAPIV5) PutTemplate(templateName string, template []byte) ([]byte, error)
- func (s *ESAPIV5) Refresh(name string) (err error)
- func (s *ESAPIV5) TemplateExists(templateName string) (bool, error)
- func (s *ESAPIV5) UpdateIndexSettings(indexName string, settings map[string]interface{}) error
- func (s *ESAPIV5) UpdateMapping(indexName string, mappings []byte) ([]byte, error)
- type ESAPIV6
- type ESAPIV7
- func (c *ESAPIV7) Delete(indexName, id string) (*elastic.DeleteResponse, error)
- func (c *ESAPIV7) Get(indexName, id string) (*elastic.GetResponse, error)
- func (c *ESAPIV7) Index(indexName string, id interface{}, data interface{}) (*elastic.InsertResponse, error)
- func (c *ESAPIV7) Init()
- func (c *ESAPIV7) NewScroll(indexNames string, scrollTime string, docBufferCount int, query string, ...) (scroll interface{}, err error)
- func (c *ESAPIV7) NextScroll(scrollTime string, scrollId string) (interface{}, error)
- func (c *ESAPIV7) UpdateMapping(indexName string, mappings []byte) ([]byte, error)
Constants ¶
View Source
const TypeName6 = "doc"
View Source
const TypeName7 = "_doc"
Variables ¶
This section is empty.
Functions ¶
func ClusterVersion ¶
func ClusterVersion(config *elastic.ElasticsearchConfig) (elastic.ClusterVersion, error)
Types ¶
type ESAPIV0 ¶
type ESAPIV0 struct { Version elastic.ClusterVersion Config elastic.ElasticsearchConfig }
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 (*ESAPIV0) Delete ¶
func (c *ESAPIV0) Delete(indexName, id string) (*elastic.DeleteResponse, error)
Delete used to delete document by id
func (*ESAPIV0) DeleteIndex ¶
func (*ESAPIV0) Get ¶
func (c *ESAPIV0) Get(indexName, id string) (*elastic.GetResponse, error)
Get fetch document by id
func (*ESAPIV0) GetIndexSettings ¶
func (*ESAPIV0) GetMapping ¶
func (*ESAPIV0) Index ¶
func (c *ESAPIV0) Index(indexName string, id interface{}, data interface{}) (*elastic.InsertResponse, error)
Index index a document into elasticsearch
func (*ESAPIV0) NextScroll ¶
func (*ESAPIV0) PutTemplate ¶
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 (*ESAPIV0) TemplateExists ¶
func (*ESAPIV0) UpdateIndexSettings ¶
type ESAPIV5 ¶
type ESAPIV5 struct {
ESAPIV0
}
func (*ESAPIV5) ClusterHealth ¶
func (s *ESAPIV5) ClusterHealth() *elastic.ClusterHealth
func (*ESAPIV5) CreateIndex ¶
func (*ESAPIV5) DeleteIndex ¶
func (*ESAPIV5) GetIndexSettings ¶
func (*ESAPIV5) GetMapping ¶
func (*ESAPIV5) NextScroll ¶
func (*ESAPIV5) PutTemplate ¶
func (*ESAPIV5) TemplateExists ¶
func (*ESAPIV5) UpdateIndexSettings ¶
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) NextScroll ¶
Click to show internal directories.
Click to hide internal directories.