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

collection_deleteshard

Delete a shard


Description

Deleting a shard will unload all replicas of the shard and remove them from clusterstate.json. It will only remove shards that are inactive, or which have no range given for custom sharding.

Usage

collection_deleteshard(conn, name, shard, raw = FALSE, ...)

Arguments

conn

A solrium connection object, see SolrClient

name

(character) Required. The name of the collection that includes the shard to be deleted

shard

(character) Required. The name of the shard to be deleted

raw

(logical) If TRUE, returns raw data

...

curl options passed on to crul::HttpClient

Examples

## Not run: 
(conn <- SolrClient$new())

# create collection
if (!conn$collection_exists("buffalo")) {
  conn$collection_create(name = "buffalo")
  # OR: bin/solr create -c buffalo
}

# find shard names
names(conn$collection_clusterstatus()$cluster$collections$buffalo$shards)

# split a shard by name
collection_splitshard(conn, name = "buffalo", shard = "shard1")

# now we have three shards
names(conn$collection_clusterstatus()$cluster$collections$buffalo$shards)

# delete shard
conn$collection_deleteshard(name = "buffalo", shard = "shard1_1")

## End(Not run)

solrium

General Purpose R Interface to 'Solr'

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

We don't support your browser anymore

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