Description Usage Arguments Examples
View source: R/collection_balanceshardunique.R
Insures that a particular property is distributed evenly amongst the physical nodes that make up a collection. If the property already exists on a replica, every effort is made to leave it there. If the property is not on any replica on a shard one is chosen and the property is added.
1 2 3 4 5 6 7 8 9 |
conn |
A solrium connection object, see SolrClient |
name |
(character) The name of the core to be created. Required |
property |
(character) Required. The property to balance. The literal "property." is prepended to this property if not specified explicitly. |
onlyactivenodes |
(logical) Normally, the property is instantiated
on active nodes only. If |
shardUnique |
(logical) Something of a safety valve. There is one
pre-defined property (preferredLeader) that defaults this value to |
raw |
(logical) If |
... |
You can pass in parameters like |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
(conn <- SolrClient$new())
# create collection
if (!conn$collection_exists("addrep")) {
conn$collection_create(name = "mycollection")
# OR: bin/solr create -c mycollection
}
# balance preferredLeader property
conn$collection_balanceshardunique("mycollection", property = "preferredLeader")
# examine cluster status
conn$collection_clusterstatus()$cluster$collections$mycollection
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.