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