Description Usage Arguments Examples
View source: R/collection_addreplica.R
Add a replica to a shard in a collection. The node name can be specified if the replica is to be created in a specific node
1 2 3 4 5 6 7 8 9 10 11 12 13 |
conn |
A solrium connection object, see SolrClient |
name |
(character) The name of the core to be created. Required |
shard |
(character) The name of the shard to which replica is to be added.
If |
route |
(character) If the exact shard name is not known, users may pass
the |
node |
(character) The name of the node where the replica should be created |
instanceDir |
(character) The instanceDir for the core that will be created |
dataDir |
(character) The directory in which the core should be created |
async |
(character) Request ID to track this action which will be processed asynchronously |
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("foobar")) {
conn$collection_create(name = "foobar", numShards = 2)
# OR bin/solr create -c foobar
}
# status
conn$collection_clusterstatus()$cluster$collections$foobar
# add replica
if (!conn$collection_exists("foobar")) {
conn$collection_addreplica(name = "foobar", shard = "shard1")
}
# status again
conn$collection_clusterstatus()$cluster$collections$foobar
conn$collection_clusterstatus()$cluster$collections$foobar$shards
conn$collection_clusterstatus()$cluster$collections$foobar$shards$shard1
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.