Documentation ¶
Index ¶
- Constants
- type AliasesResponse
- type ESAPIV0
- func (c *ESAPIV0) Alias(body []byte) error
- func (c *ESAPIV0) Bulk(data []byte) (*util.Result, error)
- func (c *ESAPIV0) CatNodes(colStr string) ([]elastic.CatNodeResponse, error)
- func (c *ESAPIV0) CatShards() ([]elastic.CatShardResponse, error)
- func (c *ESAPIV0) CatShardsSpecEndpoint(endPoint string) ([]elastic.CatShardResponse, error)
- func (s *ESAPIV0) ClearScroll(scrollId string) error
- func (c *ESAPIV0) Close(name string) ([]byte, error)
- func (c *ESAPIV0) ClusterHealth(ctx context.Context) (*elastic.ClusterHealth, error)
- func (c *ESAPIV0) ClusterHealthSpecEndpoint(ctx context.Context, endPoint string, level string) (*elastic.ClusterHealth, error)
- func (c *ESAPIV0) ClusterVersion() elastic.Version
- func (c *ESAPIV0) Count(ctx context.Context, indexName string, body []byte) (*elastic.CountResponse, error)
- func (c *ESAPIV0) CreateAutoFollowReplication(autoFollowPatternName string, body []byte) error
- func (c *ESAPIV0) CreateIndex(indexName string, settings map[string]interface{}) (err error)
- func (c *ESAPIV0) Delete(indexName, docType, id string, refresh ...string) (*elastic.DeleteResponse, error)
- func (c *ESAPIV0) DeleteAutoFollowReplication(autoFollowPatternName string, body []byte) error
- func (c *ESAPIV0) DeleteByQuery(indexName string, body []byte) (*elastic.DeleteByQueryResponse, error)
- func (c *ESAPIV0) DeleteILMPolicy(target string) error
- func (c *ESAPIV0) DeleteIndex(indexName string) (err error)
- func (c *ESAPIV0) DeleteRole(roleName string) error
- func (c *ESAPIV0) DeleteSearchTemplate(templateID string) error
- func (c *ESAPIV0) DeleteUser(username string) error
- func (c *ESAPIV0) Exists(target string) (bool, error)
- func (c *ESAPIV0) FieldCaps(target string) ([]byte, error)
- func (c *ESAPIV0) Flush(indexName string) ([]byte, error)
- func (c *ESAPIV0) Forcemerge(indexName string, maxCount int) error
- func (c *ESAPIV0) Get(indexName, docType, id string) (*elastic.GetResponse, error)
- func (c *ESAPIV0) GetActivePreferredEndpoint(host string) string
- func (c *ESAPIV0) GetAliases() (*map[string]elastic.AliasInfo, error)
- func (c *ESAPIV0) GetAliasesAndIndices() (*elastic.AliasAndIndicesResponse, error)
- func (c *ESAPIV0) GetAliasesDetail() (*map[string]elastic.AliasDetailInfo, error)
- func (c *ESAPIV0) GetAutoFollowStats(autoFollowPatternName string) ([]byte, error)
- func (c *ESAPIV0) GetClusterSettings(values url.Values) (map[string]interface{}, error)
- func (c *ESAPIV0) GetClusterState() (*elastic.ClusterState, error)
- func (c *ESAPIV0) GetClusterStats(ctx context.Context, node string) (*elastic.ClusterStats, error)
- func (c *ESAPIV0) GetClusterStatsSpecEndpoint(ctx context.Context, node string, endPoint string) (*elastic.ClusterStats, error)
- func (c *ESAPIV0) GetEndpoint() string
- func (c *ESAPIV0) GetILMPolicy(target string) (map[string]interface{}, error)
- func (c *ESAPIV0) GetIndex(indexName string) (map[string]interface{}, error)
- func (c *ESAPIV0) GetIndexRoutingTable(index string) (map[string][]elastic.IndexShardRouting, error)
- func (c *ESAPIV0) GetIndexSettings(indexNames string) (*util.MapStr, error)
- func (c *ESAPIV0) GetIndexStats(indexName string) (*util.MapStr, error)
- func (c *ESAPIV0) GetIndices(pattern string) (*map[string]elastic.IndexInfo, error)
- func (c *ESAPIV0) GetIndicesStats() *elastic.IndicesStats
- func (c *ESAPIV0) GetMajorVersion() int
- func (c *ESAPIV0) GetMapping(copyAllIndexes bool, indexNames string) (string, int, *util.MapStr, error)
- func (c *ESAPIV0) GetMetadata() *elastic.ElasticsearchMetadata
- func (c *ESAPIV0) GetNodeInfo(nodeID string) (*elastic.NodesInfo, error)
- func (c *ESAPIV0) GetNodes() (*map[string]elastic.NodesInfo, error)
- func (c *ESAPIV0) GetNodesStats(nodeID, host string, level string) *elastic.NodesStats
- func (c *ESAPIV0) GetPrimaryShards() (*map[string]map[int]elastic.ShardInfo, error)
- func (c *ESAPIV0) GetPrivileges() ([]byte, error)
- func (c *ESAPIV0) GetRemoteInfo() ([]byte, error)
- func (c *ESAPIV0) GetReplicationFollowerStats(followIndex string) ([]byte, error)
- func (c *ESAPIV0) GetReplicationStatus(followIndex string) ([]byte, error)
- func (c *ESAPIV0) GetRole(roleName string) ([]byte, error)
- func (c *ESAPIV0) GetRoles() ([]byte, error)
- func (c *ESAPIV0) GetStats() (*elastic.Stats, error)
- func (c *ESAPIV0) GetTemplate(templateName string) (map[string]interface{}, error)
- func (c *ESAPIV0) GetUser(username string) ([]byte, error)
- func (c *ESAPIV0) GetUsers() ([]byte, error)
- func (c *ESAPIV0) GetVersion() elastic.Version
- func (c *ESAPIV0) Index(indexName, docType string, id interface{}, data interface{}, refresh string) (*elastic.InsertResponse, error)
- func (c *ESAPIV0) IndexExists(indexName string) (bool, error)
- func (c *ESAPIV0) InitDefaultTemplate(templateName, indexPrefix string)
- func (s *ESAPIV0) NewScroll(indexNames string, scrollTime string, docBufferCount int, ...) ([]byte, error)
- func (s *ESAPIV0) NextScroll(ctx *elastic.APIContext, scrollTime string, scrollId string) ([]byte, error)
- func (c *ESAPIV0) Open(name string) ([]byte, error)
- func (c *ESAPIV0) PauseReplication(followIndex string, body []byte) error
- func (c *ESAPIV0) PutILMPolicy(target string, policyConfig []byte) error
- func (c *ESAPIV0) PutRole(roleName string, body []byte) error
- func (c *ESAPIV0) PutScript(scriptName string, script []byte) ([]byte, error)
- func (c *ESAPIV0) PutTemplate(templateName string, template []byte) ([]byte, error)
- func (c *ESAPIV0) PutUser(username string, body []byte) error
- func (c *ESAPIV0) QueryDSL(ctx context.Context, indexName string, queryArgs *[]util.KV, queryDSL []byte) (*elastic.SearchResponse, error)
- func (s *ESAPIV0) Refresh(name string) (err error)
- func (c *ESAPIV0) Reindex(body []byte) (*elastic.ReindexResponse, error)
- func (c *ESAPIV0) RenderTemplate(body map[string]interface{}) ([]byte, error)
- func (c *ESAPIV0) Request(ctx context.Context, method, url string, body []byte) (result *util.Result, err error)
- func (c *ESAPIV0) ResumeReplication(followIndex string, body []byte) error
- func (c *ESAPIV0) ScriptExists(scriptName string) (bool, error)
- func (c *ESAPIV0) Search(indexName string, query *elastic.SearchRequest) (*elastic.SearchResponse, error)
- func (c *ESAPIV0) SearchByTemplate(indexName, scriptName string, params map[string]interface{}) (*elastic.SearchResponse, error)
- func (c *ESAPIV0) SearchTasksByIds(ids []string) (*elastic.SearchResponse, error)
- func (c *ESAPIV0) SearchTemplate(body map[string]interface{}) ([]byte, error)
- func (c *ESAPIV0) SearchWithRawQueryDSL(indexName string, queryDSL []byte) (*elastic.SearchResponse, error)
- func (c *ESAPIV0) SetSearchTemplate(templateID string, body []byte) error
- func (c *ESAPIV0) StartReplication(followIndex string, body []byte) error
- func (c *ESAPIV0) StopReplication(indexName string, body []byte) error
- func (c *ESAPIV0) TemplateExists(templateName string) (bool, error)
- func (c *ESAPIV0) Update(indexName, docType string, id interface{}, data interface{}, refresh string) (*elastic.InsertResponse, error)
- func (c *ESAPIV0) UpdateByQuery(indexName string, body []byte) (*elastic.UpdateByQueryResponse, error)
- func (c *ESAPIV0) UpdateClusterSettings(body []byte) error
- func (s *ESAPIV0) UpdateIndexSettings(name string, settings map[string]interface{}) error
- func (s *ESAPIV0) UpdateMapping(indexName string, docType string, mappings []byte) ([]byte, error)
- type ESAPIV2
- type ESAPIV5
- func (c *ESAPIV5) CatNodes(colStr string) ([]elastic.CatNodeResponse, error)
- func (c *ESAPIV5) InitDefaultTemplate(templateName, indexPrefix string)
- func (s *ESAPIV5) NewScroll(indexNames string, scrollTime string, docBufferCount int, ...) ([]byte, error)
- func (s *ESAPIV5) SetSearchTemplate(templateID string, body []byte) error
- func (c *ESAPIV5) Update(indexName, docType string, id interface{}, data interface{}, refresh string) (*elastic.InsertResponse, error)
- type ESAPIV5_4
- type ESAPIV5_6
- type ESAPIV6
- type ESAPIV6_6
- func (s *ESAPIV6_6) DeleteILMPolicy(target string) error
- func (s *ESAPIV6_6) GetILMPolicy(target string) (map[string]interface{}, error)
- func (s *ESAPIV6_6) PutILMPolicy(target string, policyConfig []byte) error
- func (s *ESAPIV6_6) UpdateMapping(indexName string, docType string, mappings []byte) ([]byte, error)
- type ESAPIV7
- func (c *ESAPIV7) CreateIndex(indexName string, settings map[string]interface{}) (err error)
- func (c *ESAPIV7) Delete(indexName, docType, id string, refresh ...string) (*elastic.DeleteResponse, error)
- func (c *ESAPIV7) Get(indexName, docType, id string) (*elastic.GetResponse, error)
- func (c *ESAPIV7) Index(indexName, docType string, id interface{}, data interface{}, refresh string) (*elastic.InsertResponse, error)
- func (c *ESAPIV7) InitDefaultTemplate(templateName, indexPrefix string)
- func (c *ESAPIV7) PutScript(scriptName string, script []byte) ([]byte, error)
- func (c *ESAPIV7) ScriptExists(scriptName string) (bool, error)
- func (c *ESAPIV7) SearchByTemplate(indexName, scriptName string, params map[string]interface{}) (*elastic.SearchResponse, error)
- func (c *ESAPIV7) Update(indexName, docType string, id interface{}, data interface{}, refresh string) (*elastic.InsertResponse, error)
- func (c *ESAPIV7) UpdateMapping(indexName string, docType string, mappings []byte) ([]byte, error)
- type ESAPIV7_3
- type ESAPIV7_7
- type ESAPIV8
- func (c *ESAPIV8) CreateIndex(indexName string, settings map[string]interface{}) (err error)
- func (c *ESAPIV8) Delete(indexName, docType, id string, refresh ...string) (*elastic.DeleteResponse, error)
- func (c *ESAPIV8) Flush(indexName string) ([]byte, error)
- func (c *ESAPIV8) Get(indexName, docType, id string) (*elastic.GetResponse, error)
- func (c *ESAPIV8) Index(indexName, docType string, id interface{}, data interface{}, refresh string) (*elastic.InsertResponse, error)
- func (c *ESAPIV8) InitDefaultTemplate(templateName, indexPrefix string)
Constants ¶
View Source
const TypeName0 = "doc"
View Source
const TypeName5 = "doc"
View Source
const TypeName6 = "doc"
View Source
const TypeName7 = "_doc"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AliasesResponse ¶
type AliasesResponse struct { Aliases map[string]struct { IsWriteIndex bool `json:"is_write_index,omitempty"` IsHiddenIndex bool `json:"is_hidden,omitempty"` IndexRouting string `json:"index_routing,omitempty"` SearchRouting string `json:"search_routing,omitempty"` Filter interface{} `json:"filter,omitempty"` } `json:"aliases,omitempty"` }
"dict" : { "aliases" : { "dictalias1" : { "is_write_index" : true }, "dictalias2" : { "is_write_index" : true } } },
type ESAPIV0 ¶
type ESAPIV0 struct { Elasticsearch string Version elastic.Version // contains filtered or unexported fields }
func (*ESAPIV0) CatNodes ¶
func (c *ESAPIV0) CatNodes(colStr string) ([]elastic.CatNodeResponse, error)
func (*ESAPIV0) CatShardsSpecEndpoint ¶
func (c *ESAPIV0) CatShardsSpecEndpoint(endPoint string) ([]elastic.CatShardResponse, error)
func (*ESAPIV0) ClearScroll ¶
func (*ESAPIV0) ClusterHealth ¶
func (*ESAPIV0) ClusterHealthSpecEndpoint ¶
func (c *ESAPIV0) ClusterHealthSpecEndpoint(ctx context.Context, endPoint string, level string) (*elastic.ClusterHealth, error)
ClusterHealthSpecEndpoint @param url eg: http://192.168.3.22:9200
func (*ESAPIV0) ClusterVersion ¶
func (*ESAPIV0) Count ¶
func (c *ESAPIV0) Count(ctx context.Context, indexName string, body []byte) (*elastic.CountResponse, error)
Count used to count how many docs in one index
func (*ESAPIV0) CreateAutoFollowReplication ¶
func (*ESAPIV0) CreateIndex ¶
func (*ESAPIV0) Delete ¶
func (c *ESAPIV0) Delete(indexName, docType, id string, refresh ...string) (*elastic.DeleteResponse, error)
Delete used to delete document by id
func (*ESAPIV0) DeleteAutoFollowReplication ¶
func (*ESAPIV0) DeleteByQuery ¶
func (*ESAPIV0) DeleteILMPolicy ¶
func (*ESAPIV0) DeleteIndex ¶
func (*ESAPIV0) DeleteRole ¶
func (*ESAPIV0) DeleteSearchTemplate ¶
func (*ESAPIV0) DeleteUser ¶
func (*ESAPIV0) Get ¶
func (c *ESAPIV0) Get(indexName, docType, id string) (*elastic.GetResponse, error)
Get fetch document by id
func (*ESAPIV0) GetActivePreferredEndpoint ¶
func (*ESAPIV0) GetAliasesAndIndices ¶
func (c *ESAPIV0) GetAliasesAndIndices() (*elastic.AliasAndIndicesResponse, error)
func (*ESAPIV0) GetAliasesDetail ¶
func (c *ESAPIV0) GetAliasesDetail() (*map[string]elastic.AliasDetailInfo, error)
func (*ESAPIV0) GetAutoFollowStats ¶
func (*ESAPIV0) GetClusterSettings ¶
func (*ESAPIV0) GetClusterState ¶
func (c *ESAPIV0) GetClusterState() (*elastic.ClusterState, error)
func (*ESAPIV0) GetClusterStats ¶
func (*ESAPIV0) GetClusterStatsSpecEndpoint ¶
func (*ESAPIV0) GetEndpoint ¶
func (*ESAPIV0) GetILMPolicy ¶
func (*ESAPIV0) GetIndexRoutingTable ¶
func (*ESAPIV0) GetIndexSettings ¶
func (*ESAPIV0) GetIndexStats ¶
func (*ESAPIV0) GetIndices ¶
func (*ESAPIV0) GetIndicesStats ¶
func (c *ESAPIV0) GetIndicesStats() *elastic.IndicesStats
func (*ESAPIV0) GetMajorVersion ¶
func (*ESAPIV0) GetMapping ¶
func (*ESAPIV0) GetMetadata ¶
func (c *ESAPIV0) GetMetadata() *elastic.ElasticsearchMetadata
func (*ESAPIV0) GetNodeInfo ¶
func (*ESAPIV0) GetNodesStats ¶
func (c *ESAPIV0) GetNodesStats(nodeID, host string, level string) *elastic.NodesStats
func (*ESAPIV0) GetPrimaryShards ¶
func (*ESAPIV0) GetPrivileges ¶
func (*ESAPIV0) GetRemoteInfo ¶
func (*ESAPIV0) GetReplicationFollowerStats ¶
func (*ESAPIV0) GetReplicationStatus ¶
func (*ESAPIV0) GetTemplate ¶
func (*ESAPIV0) GetVersion ¶
func (*ESAPIV0) Index ¶
func (c *ESAPIV0) Index(indexName, docType string, id interface{}, data interface{}, refresh string) (*elastic.InsertResponse, error)
Index index a document into elasticsearch
func (*ESAPIV0) InitDefaultTemplate ¶
func (*ESAPIV0) NextScroll ¶
func (*ESAPIV0) PauseReplication ¶
func (*ESAPIV0) PutILMPolicy ¶
func (*ESAPIV0) PutTemplate ¶
func (*ESAPIV0) RenderTemplate ¶
func (*ESAPIV0) ResumeReplication ¶
func (*ESAPIV0) Search ¶
func (c *ESAPIV0) Search(indexName string, query *elastic.SearchRequest) (*elastic.SearchResponse, error)
Search used to execute a search query
func (*ESAPIV0) SearchByTemplate ¶
func (*ESAPIV0) SearchTasksByIds ¶
func (c *ESAPIV0) SearchTasksByIds(ids []string) (*elastic.SearchResponse, error)
func (*ESAPIV0) SearchTemplate ¶
func (*ESAPIV0) SearchWithRawQueryDSL ¶
func (*ESAPIV0) SetSearchTemplate ¶
func (*ESAPIV0) StartReplication ¶
func (*ESAPIV0) StopReplication ¶
func (*ESAPIV0) TemplateExists ¶
func (*ESAPIV0) UpdateByQuery ¶
func (*ESAPIV0) UpdateClusterSettings ¶
func (*ESAPIV0) UpdateIndexSettings ¶
type ESAPIV2 ¶
type ESAPIV2 struct {
ESAPIV0
}
func (*ESAPIV2) ClearScroll ¶
func (*ESAPIV2) NextScroll ¶
type ESAPIV5 ¶
type ESAPIV5 struct {
ESAPIV2
}
func (*ESAPIV5) CatNodes ¶
func (c *ESAPIV5) CatNodes(colStr string) ([]elastic.CatNodeResponse, error)
func (*ESAPIV5) InitDefaultTemplate ¶
func (*ESAPIV5) SetSearchTemplate ¶
type ESAPIV5_6 ¶
type ESAPIV5_6 struct {
ESAPIV5_4
}
func (*ESAPIV5_6) ClearScroll ¶
func (*ESAPIV5_6) DeleteSearchTemplate ¶
func (*ESAPIV5_6) RenderTemplate ¶
type ESAPIV6_6 ¶
type ESAPIV6_6 struct {
ESAPIV6
}
func (*ESAPIV6_6) DeleteILMPolicy ¶
func (*ESAPIV6_6) GetILMPolicy ¶
func (*ESAPIV6_6) PutILMPolicy ¶
type ESAPIV7 ¶
type ESAPIV7 struct {
ESAPIV6_6
}
func (*ESAPIV7) CreateIndex ¶
func (*ESAPIV7) Delete ¶
func (c *ESAPIV7) Delete(indexName, docType, id string, refresh ...string) (*elastic.DeleteResponse, error)
Delete used to delete document by id
func (*ESAPIV7) Get ¶
func (c *ESAPIV7) Get(indexName, docType, id string) (*elastic.GetResponse, error)
Get fetch document by id
func (*ESAPIV7) Index ¶
func (c *ESAPIV7) Index(indexName, docType string, id interface{}, data interface{}, refresh string) (*elastic.InsertResponse, error)
IndexDoc index a document into elasticsearch
func (*ESAPIV7) InitDefaultTemplate ¶
func (*ESAPIV7) SearchByTemplate ¶
type ESAPIV7_3 ¶
type ESAPIV7_3 struct {
ESAPIV7
}
func (*ESAPIV7_3) GetClusterState ¶
func (c *ESAPIV7_3) GetClusterState() (*elastic.ClusterState, error)
type ESAPIV8 ¶
type ESAPIV8 struct {
ESAPIV7_7
}
func (*ESAPIV8) CreateIndex ¶
func (*ESAPIV8) Delete ¶
func (c *ESAPIV8) Delete(indexName, docType, id string, refresh ...string) (*elastic.DeleteResponse, error)
Delete used to delete document by id
func (*ESAPIV8) Get ¶
func (c *ESAPIV8) Get(indexName, docType, id string) (*elastic.GetResponse, error)
Get fetch document by id
func (*ESAPIV8) Index ¶
func (c *ESAPIV8) Index(indexName, docType string, id interface{}, data interface{}, refresh string) (*elastic.InsertResponse, error)
IndexDoc index a document into elasticsearch
func (*ESAPIV8) InitDefaultTemplate ¶
Click to show internal directories.
Click to hide internal directories.