Learn R Programming

elastic (version 0.3.0)

cat: Use the cat Elasticsearch api.

Description

Use the cat Elasticsearch api.

Usage

cat_(verbose = FALSE, index = NULL, fields = NULL, ...)

cat_aliases(verbose = FALSE, index = NULL, fields = NULL, ...)

cat_allocation(verbose = FALSE, index = NULL, fields = NULL, ...)

cat_count(verbose = FALSE, index = NULL, fields = NULL, ...)

cat_segments(verbose = FALSE, index = NULL, fields = NULL, ...)

cat_health(verbose = FALSE, index = NULL, fields = NULL, ...)

cat_indices(verbose = FALSE, index = NULL, fields = NULL, ...)

cat_master(verbose = FALSE, index = NULL, fields = NULL, ...)

cat_nodes(verbose = FALSE, index = NULL, fields = NULL, ...)

cat_pending_tasks(verbose = FALSE, index = NULL, fields = NULL, ...)

cat_plugins(verbose = FALSE, index = NULL, fields = NULL, ...)

cat_recovery(verbose = FALSE, index = NULL, fields = NULL, ...)

cat_thread_pool(verbose = FALSE, index = NULL, fields = NULL, ...)

cat_shards(verbose = FALSE, index = NULL, fields = NULL, ...)

cat_fielddata(verbose = FALSE, index = NULL, fields = NULL, ...)

Arguments

verbose
If TRUE (default) the url call used printed to console.
index
Index name
fields
Fields to return, only used with fielddata
...
Curl args passed on to POST

Details

See http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cat.html for the cat API documentation.

Note how cat_ has an underscore at the end to avoid conflict with the function cat in base R.

Examples

Run this code
# list Elasticsearch cat endpoints
cat_()

# Do other cat operations
cat_aliases()
cat_aliases(index='plos')
cat_allocation()
cat_allocation(verbose=TRUE)
cat_count()
cat_count(index='plos')
cat_count(index='gbif')
cat_segments()
cat_segments(index='gbif')
cat_health()
cat_indices()
cat_master()
cat_nodes()
cat_pending_tasks()
cat_plugins()
cat_recovery(verbose=TRUE)
cat_recovery(index='gbif')
cat_thread_pool()
cat_thread_pool(verbose=TRUE)
cat_shards()
cat_fielddata()
cat_fielddata(fields='body')

# Curl options
library("httr")
cat_count(config=verbose())

Run the code above in your browser using DataLab