You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "mike st. john" <ms...@gmail.com> on 2013/05/22 07:20:35 UTC

setting the collection in cloudsolrserver without using setdefaultcollection.

Is there any way to set the collection without passing setDefaultCollection
in cloudsolrserver?

I'm using cloudsolrserver with spring, and would like to autowire it.



Thanks

msj

Re: setting the collection in cloudsolrserver without using setdefaultcollection.

Posted by Shawn Heisey <so...@elyograg.org>.
On 5/21/2013 11:20 PM, mike st. john wrote:
> Is there any way to set the collection without passing setDefaultCollection
> in cloudsolrserver?
> 
> I'm using cloudsolrserver with spring, and would like to autowire it.

It's a query parameter:

http://wiki.apache.org/solr/SolrCloud#Distributed_Requests

Here's how you do it in SolrJ:

  SolrQuery query = new SolrQuery();
  query.set("collection", "collection3");

Thanks,
Shawn