lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anshum Gupta <>
Subject Re: Solrj , how to create collection
Date Sun, 20 Mar 2016 03:44:51 GMT
Are you running Solr in Cloud (ZooKeeper aware) mode ? If so, manual
creation of core is actually not something that is supported. It works, but
it's not supported.

Assuming you _are_ running in cloud mode, the answer to your question is
yes. Provided you upload the configuration to be used by SolrCloud before
the collection creation command.
It seems like we are lacking all the documentation for the same but you can
explore the subclasses in CollectionAdminRequest.

Here's an example how you'd do that in Solr 5.5:

CloudSolrClient cloudClient = new CloudSolrClient(zkHostString);

CollectionAdminRequest.Create req = new CollectionAdminRequest.Create();
CollectionAdminResponse response = req.setCollectionName("foo")

You can then parse the response.

Hope this helps.

On Sat, Mar 19, 2016 at 4:44 PM, Iana Bondarska <> wrote:

> Hi,
> Could you please tell me, is it possible to create new collection on solr
> server only using solrj,without manual creation of core folder on server.
> I'm using solrj v.5.5.0,standalone client.
> Thanks,
> Iana

Anshum Gupta

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message