15.SolrJ集群操作
api同SolrJ单机版,唯一需要改动的是SolrServer的实现类
// 注意地址改成zkHost
String zkHost = "zookeeper01:2181,zookeeper02:2181,zookeeper03:2181";
CloudSolrServer solrServer = new CloudSolrServer(zkHost);
// 设置默认的collection
solrServer.setDefaultCollection("collection2");