indices

package
v0.0.0-...-56f2276 Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearCache

func ClearCache(clearId bool, clearBloom bool, 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 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

func IndicesExists(indices ...string) (bool, error)

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 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(pretty bool, 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, analyzer string, tokenizer string, field string, text string, filters ...string) (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 OptimizeResponse

type OptimizeResponse struct {
	Ok     bool       `json:"ok"`
	Shards api.Status `json:"_shards"`
}

func OptimizeIndices

func OptimizeIndices(max_num_segments int, only_expunge_deletes bool, refresh bool, flush bool, wait_for_merge bool,
	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 Token

type Token struct {
	Name        string `json:"token"`
	StartOffset string `json:"start_offset"`
	EndOffset   string `json:"end_offset"`
	Type        string `json:"type"`
	Position    string `json:"position"`
}

Jump to

Keyboard shortcuts

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