indices

package
v0.0.0-...-054c023 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2014 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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

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 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 IdOptions

type IdOptions struct {
	Index string `json:"index,omitempty"`
	Path  string `json:"path,omitempty"`
}

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

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

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"`
}

type Token

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

Jump to

Keyboard shortcuts

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