Documentation ¶
Index ¶
- func ClearCache(clearId bool, clearBloom bool, args map[string]interface{}, indices ...string) (api.ExtendedStatus, error)
- func Delete(index string) (api.BaseResponse, error)
- func Flush(indices ...string) (api.BaseResponse, error)
- func IndicesExists(indices ...string) (bool, error)
- func PutMapping(index string, typeName string, instance interface{}, opt MappingOptions) error
- func Refresh(indices ...string) (api.BaseResponse, error)
- func Snapshot(indices ...string) (api.ExtendedStatus, error)
- func Status(args map[string]interface{}, indices ...string) (api.BaseResponse, error)
- type AnalyzeResponse
- type IdOptions
- type Mapping
- type MappingOptions
- type OptimizeResponse
- type TimestampOptions
- type Token
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearCache ¶
func ClearCache(clearId bool, clearBloom bool, args map[string]interface{}, indices ...string) (api.ExtendedStatus, error)
ClearCache allows to clear either all caches or specific cached associated with one ore more indices. see http://www.elasticsearch.org/guide/reference/api/admin-indices-clearcache/
func Delete ¶
func Delete(index string) (api.BaseResponse, error)
The delete API allows you to delete one or more indices through an API. This operation may fail if the elasitsearch configuration has been set to forbid deleting indexes.
func Flush ¶
func Flush(indices ...string) (api.BaseResponse, error)
Flush flushes one or more indices through an API. The flush process of an index basically frees memory from the index by flushing data to the index storage and clearing the internal transaction log. By default, ElasticSearch uses memory heuristics in order to automatically trigger flush operations as required in order to clear memory. http://www.elasticsearch.org/guide/reference/api/admin-indices-flush.html TODO: add Shards to response
func IndicesExists ¶
IndicesExists checks for the existance of indices. uses http 404 if it does not exist, and 200 if it does see http://www.elasticsearch.org/guide/reference/api/admin-indices-indices-exists/
func PutMapping ¶
func PutMapping(index string, typeName string, instance interface{}, opt MappingOptions) error
func Refresh ¶
func Refresh(indices ...string) (api.BaseResponse, error)
Refresh explicitly refreshes one or more index, making all operations performed since the last refresh available for search. The (near) real-time capabilities depend on the index engine used. For example, the robin one requires refresh to be called, but by default a refresh is scheduled periodically. http://www.elasticsearch.org/guide/reference/api/admin-indices-refresh.html TODO: add Shards to response
func Snapshot ¶
func Snapshot(indices ...string) (api.ExtendedStatus, error)
Snapshot allows to explicitly perform a snapshot through the gateway of one or more indices (backup them). By default, each index gateway periodically snapshot changes, though it can be disabled and be controlled completely through this API. see http://www.elasticsearch.org/guide/reference/api/admin-indices-gateway-snapshot/
func Status ¶
func Status(args map[string]interface{}, indices ...string) (api.BaseResponse, error)
Status lists status details of all indices or the specified index. http://www.elasticsearch.org/guide/reference/api/admin-indices-status.html
Types ¶
type AnalyzeResponse ¶
type AnalyzeResponse struct {
Tokens []Token `json:"tokens"`
}
func AnalyzeIndices ¶
func AnalyzeIndices(index string, args map[string]interface{}) (AnalyzeResponse, error)
AnalyzeIndices performs the analysis process on a text and return the tokens breakdown of the text. http://www.elasticsearch.org/guide/reference/api/admin-indices-analyze/
type Mapping ¶
type Mapping map[string]MappingOptions
func MappingForType ¶
func MappingForType(typeName string, opts MappingOptions) Mapping
func (Mapping) Options ¶
func (m_ Mapping) Options() MappingOptions
type MappingOptions ¶
type MappingOptions struct { Id IdOptions `json:"_id"` Timestamp TimestampOptions `json:"_timestamp"` Properties map[string]interface{} `json:"properties"` }
type OptimizeResponse ¶
func OptimizeIndices ¶
func OptimizeIndices(args map[string]interface{}, indices ...string) (OptimizeResponse, error)
AnalyzeIndices performs the analysis process on a text and return the tokens breakdown of the text. http://www.elasticsearch.org/guide/reference/api/admin-indices-analyze/
type TimestampOptions ¶
type TimestampOptions struct {
Enabled bool `json:"enabled"`
}