# NOT RUN {
(conn <- SolrClient$new())
# create collection
if (!conn$collection_exists("deleterep")) {
conn$collection_create(name = "deleterep")
# OR bin/solr create -c deleterep
}
# status
conn$collection_clusterstatus()$cluster$collections$deleterep$shards
# add the value bar to the property foo
conn$collection_addreplicaprop(name = "deleterep", shard = "shard1",
replica = "core_node1", property = "foo", property.value = "bar")
# check status
conn$collection_clusterstatus()$cluster$collections$deleterep$shards
conn$collection_clusterstatus()$cluster$collections$deleterep$shards$shard1$replicas$core_node1
# delete replica property
conn$collection_deletereplicaprop(name = "deleterep", shard = "shard1",
replica = "core_node1", property = "foo")
# check status - foo should be gone
conn$collection_clusterstatus()$cluster$collections$deleterep$shards$shard1$replicas$core_node1
# }
Run the code above in your browser using DataLab