Hello, Joe.

Try something like this using SolrJ library:

String endpoints[] = // your Solr server endpoints. Example:
http://localhost:8080/solr/core1
String zookeeperEndpoints = // your Zookeeper endpoints. Example:
localhost:9000
String collectionName = // Your collection name. Example: core1

LBHttpSolrServer lbSolrServer = new LBHttpSolrServer(endpoints);
this.cloudSolrServer = new CloudSolrServer(zookeeperEndpoints,
lbSolrServer);
this.cloudSolrServer.setDefaultCollection(collectionName);


You have now created a CloudSolrServer instance which can manage Solr
server operations: add a new document, delete, update, etc.

Regards,


 - Luis Cappa.

2012/11/22 joe.cohe...@gmail.com <joe.cohe...@gmail.com>

> I want to write a function that will go thorugh all the servers that store
> a
> specific collection and perform a tsk on it, suppose RELOAD CORE task.
> How can I get a list of all solr servers/urls that run a specific
> collection?
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/How-to-get-a-list-of-servers-per-collection-in-sorlcloud-using-java-api-tp4021863.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 

- Luis Cappa

Reply via email to