Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

search_shards

Search shards


Description

Search shards

Usage

search_shards(
  conn,
  index = NULL,
  raw = FALSE,
  routing = NULL,
  preference = NULL,
  local = NULL,
  ...
)

Arguments

conn

an Elasticsearch connection object, see connect()

index

One or more indeces

raw

If TRUE (default), data is parsed to list. If FALSE, then raw JSON

routing

A character vector of routing values to take into account when determining which shards a request would be executed against.

preference

Controls a preference of which shard replicas to execute the search request on. By default, the operation is randomized between the shard replicas. See preference for a list of all acceptable values.

local

(logical) Whether to read the cluster state locally in order to determine where shards are allocated instead of using the Master node's cluster state.

...

Curl args passed on to crul::verb-GET

References

Examples

## Not run: 
# connection setup
(x <- connect())

search_shards(x, index = "plos")
search_shards(x, index = c("plos","gbif"))
search_shards(x, index = "plos", preference='_primary')
search_shards(x, index = "plos", preference='_shards:2')

# curl options
search_shards(x, index = "plos", verbose = TRUE)

## End(Not run)

elastic

General Purpose Interface to 'Elasticsearch'

v1.2.0
MIT + file LICENSE
Authors
Scott Chamberlain [aut, cre] (<https://orcid.org/0000-0003-1444-9135>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.