Description Usage Arguments Details Examples
Use the cat Elasticsearch api.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | cat_(conn, parse = FALSE, ...)
cat_aliases(
conn,
verbose = FALSE,
index = NULL,
h = NULL,
help = FALSE,
bytes = FALSE,
parse = FALSE,
expand_wildcards = "all",
...
)
cat_allocation(
conn,
verbose = FALSE,
h = NULL,
help = FALSE,
bytes = FALSE,
parse = FALSE,
...
)
cat_count(
conn,
verbose = FALSE,
index = NULL,
h = NULL,
help = FALSE,
bytes = FALSE,
parse = FALSE,
...
)
cat_segments(
conn,
verbose = FALSE,
index = NULL,
h = NULL,
help = FALSE,
bytes = FALSE,
parse = FALSE,
...
)
cat_health(
conn,
verbose = FALSE,
h = NULL,
help = FALSE,
bytes = FALSE,
parse = FALSE,
...
)
cat_indices(
conn,
verbose = FALSE,
index = NULL,
h = NULL,
help = FALSE,
bytes = FALSE,
parse = FALSE,
...
)
cat_master(
conn,
verbose = FALSE,
index = NULL,
h = NULL,
help = FALSE,
bytes = FALSE,
parse = FALSE,
...
)
cat_nodes(
conn,
verbose = FALSE,
h = NULL,
help = FALSE,
bytes = FALSE,
parse = FALSE,
...
)
cat_nodeattrs(
conn,
verbose = FALSE,
h = NULL,
help = FALSE,
bytes = FALSE,
parse = FALSE,
...
)
cat_pending_tasks(
conn,
verbose = FALSE,
h = NULL,
help = FALSE,
bytes = FALSE,
parse = FALSE,
...
)
cat_plugins(
conn,
verbose = FALSE,
h = NULL,
help = FALSE,
bytes = FALSE,
parse = FALSE,
...
)
cat_recovery(
conn,
verbose = FALSE,
index = NULL,
h = NULL,
help = FALSE,
bytes = FALSE,
parse = FALSE,
...
)
cat_thread_pool(
conn,
verbose = FALSE,
index = NULL,
h = NULL,
help = FALSE,
bytes = FALSE,
parse = FALSE,
...
)
cat_shards(
conn,
verbose = FALSE,
index = NULL,
h = NULL,
help = FALSE,
bytes = FALSE,
parse = FALSE,
...
)
cat_fielddata(
conn,
verbose = FALSE,
index = NULL,
fields = NULL,
h = NULL,
help = FALSE,
bytes = FALSE,
parse = FALSE,
...
)
|
conn |
an Elasticsearch connection object, see |
parse |
(logical) Parse to a data.frame or not. Default: |
... |
Curl args passed on to crul::HttpClient |
verbose |
(logical) If |
index |
(character) Index name |
h |
(character) Fields to return |
help |
(logical) Output available columns, and their meanings |
bytes |
(logical) Give numbers back machine friendly. Default: |
expand_wildcards |
(character) Whether to expand wildcard expression to concrete indices that are open, closed or both. Valid choices: 'open', 'closed', 'hidden', 'none', 'all'. default: 'all'. Available in ES >= v7.7 |
fields |
(character) Fields to return, only used with |
See https://www.elastic.co/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 base::cat()
in base R.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | ## Not run:
# connection setup
(x <- connect())
# list Elasticsearch cat endpoints
cat_(x)
# Do other cat operations
cat_aliases(x)
alias_create(x, index = "plos", alias = c("tables", "chairs"))
cat_aliases(x, expand_wildcards='open')
cat_aliases(x, expand_wildcards='all')
cat_allocation(x)
cat_allocation(x, verbose=TRUE)
cat_count(x)
cat_count(x, index='plos')
cat_count(x, index='gbif')
cat_segments(x)
cat_segments(x, index='gbif')
cat_health(x)
cat_indices(x)
cat_master(x)
cat_nodes(x)
# cat_nodeattrs(x) # not available in older ES versions
cat_pending_tasks(x)
cat_plugins(x)
cat_recovery(x, verbose=TRUE)
cat_recovery(x, index='gbif')
cat_thread_pool(x)
cat_thread_pool(x, verbose=TRUE)
cat_shards(x)
cat_fielddata(x)
cat_fielddata(x, fields='body')
# capture cat data into a data.frame
cat_(x, parse = TRUE)
cat_indices(x, parse = TRUE)
cat_indices(x, parse = TRUE, verbose = TRUE)
cat_count(x, parse = TRUE)
cat_count(x, parse = TRUE, verbose = TRUE)
cat_health(x, parse = TRUE)
cat_health(x, parse = TRUE, verbose = TRUE)
# Get help - what does each column mean
head(cat_indices(x, help = TRUE, parse = TRUE))
cat_health(x, help = TRUE, parse = TRUE)
head(cat_nodes(x, help = TRUE, parse = TRUE))
# Get back only certain fields
cat_nodes(x)
cat_nodes(x, h = c('ip','port','heapPercent','name'))
cat_nodes(x, h = c('id', 'ip', 'port', 'v', 'm'))
cat_indices(x, verbose = TRUE)
cat_indices(x, verbose = TRUE, h = c('index','docs.count','store.size'))
# Get back machine friendly numbers instead of the normal human friendly
cat_indices(x, verbose = TRUE, bytes = TRUE)
# Curl options
# cat_count(x, timeout_ms = 1)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.