Hi,

I think with this : https://wiki.apache.org/solr/DocTransformers#A.5Bshard.5D

Ahmet



On Wednesday, February 26, 2014 10:36 AM, search engn dev 
<sachinyadav0...@gmail.com> wrote:
I have setup solr cloud of two shards and two replicas. I am using solrj for
communicating with solr. We are using CloudSolrServer  for searching in solr
cloud.  below is my code 

                String zkHost =
"host1:2181,host1:2182,host1:2183,host1:2184,host1:2185"; 
        CloudSolrServer server = new CloudSolrServer(zkHost);  
        server.connect();
        server.setDefaultCollection(defaultCollection);
        server.setIdField("Id");
        SolrQuery parameters = new SolrQuery();
        parameters.set("q","*:*");
        QueryResponse response = server.query(parameters);
        System.out.println(""+response.toString());

I am getting correct  response from solr. But how do i know the requested
solr hosts. ? because request can go to any live solr host. 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Knowing-shard-value-of-result-tp4119713.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to