# NOT RUN {
(conn <- SolrClient$new())
# create collection
if (!conn$collection_exists("trees")) {
conn$collection_create("trees")
}
# find shard names
names(conn$collection_clusterstatus()$cluster$collections$trees$shards)
# split a shard by name
conn$collection_splitshard(name = "trees", shard = "shard1")
# now we have three shards
names(conn$collection_clusterstatus()$cluster$collections$trees$shards)
# }
Run the code above in your browser using DataLab