Description Usage Arguments Examples
View source: R/collection_deletereplica.R
Delete a replica from a given collection and shard. If the corresponding core is up and running the core is unloaded and the entry is removed from the clusterstate. If the node/core is down , the entry is taken off the clusterstate and if the core comes up later it is automatically unregistered.
1 2 3 4 5 6 7 8 9 10 |
conn |
A solrium connection object, see SolrClient |
name |
(character) Required. The name of the collection. |
shard |
(character) Required. The name of the shard that includes the replica to be removed. |
replica |
(character) Required. The name of the replica to remove. |
onlyIfDown |
(logical) When |
raw |
(logical) If |
callopts |
curl options passed on to crul::HttpClient |
... |
You can pass in parameters like |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## Not run:
(conn <- SolrClient$new())
# create collection
if (!conn$collection_exists("foobar2")) {
conn$collection_create(name = "foobar2", maxShardsPerNode = 2)
}
# status
conn$collection_clusterstatus()$cluster$collections$foobar2$shards$shard1
# add replica
conn$collection_addreplica(name = "foobar2", shard = "shard1")
# delete replica
## get replica name
nms <- names(conn$collection_clusterstatus()$cluster$collections$foobar2$shards$shard1$replicas)
conn$collection_deletereplica(name = "foobar2", shard = "shard1", replica = nms[1])
# status again
conn$collection_clusterstatus()$cluster$collections$foobar2$shards$shard1
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.