Hi Lici,

You may want to try the following snippet

-------
                SolrServer solr = new 
CommonsHttpSolrServer("http://localhost:8983/solr";); // 

                ModifiableSolrParams params = new ModifiableSolrParams();

                params.set("wt", "json"); // Can be json,standard..
                params.set("rows", RowsToFetch); // Total # of rows to fetch
                params.set("start", StartingRow);  // Starting record
                params.set("shards", 
"localhost:8983/solr,localhost:8984/solr,localhost:8985/solr"); // Shard URL
                .
                .
                .
                params.set("q", queryStr.toString());  // User Query
                QueryResponse response = solr.query(params);
                SolrDocumentList docs = response.getResults();
-------

Thanks,
sS

--- On Fri, 10/23/09, Licinio Fernández Maurelo <licinio.fernan...@gmail.com> 
wrote:

> From: Licinio Fernández Maurelo <licinio.fernan...@gmail..com>
> Subject: Re: multicore query via solrJ
> To: solr-user@lucene.apache.org
> Date: Friday, October 23, 2009, 7:30 AM
> As no answer is given, I assume it's
> not possible. It will be great to code
> a method like this
> 
> query(SolrServer,  List<SolrServer>)
> 
> 
> 
> El 20 de octubre de 2009 11:21, Licinio Fernández Maurelo
> <
> licinio.fernan...@gmail.com>
> escribió:
> 
> > Hi there,
> > is there any way to perform a multi-core query using
> solrj?
> >
> > P.S.:
> >
> > I know about this syntax:
> > http://localhost:8983/solr/core0/select?shards=localhost:8983/solr/core0,localhost:8983/solr/core1&q=
> > but i'm looking for a more fancy way to do this using
> solrj (something like
> > shards(query) )
> >
> > thx
> >
> >
> >
> > --
> > Lici
> >
> 
> 
> 
> -- 
> Lici
> 




Reply via email to