lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <apa...@elyograg.org>
Subject Re: Creating a collection in Solr standalone mode using solrj
Date Fri, 20 Jul 2018 15:01:20 GMT
On 7/20/2018 12:09 AM, Arunan Sugunakumar wrote:
> I would like to know whether it is possible to create a collection in Solr
> through SolrJ. I tried to create and it throws me an error saying that
> "Solr instance is not running in SolrCloud mode.

A "collection" is a SolrCloud concept.  Collections are comprised of one
or more shards.  Shards are comprised of one or more replicas.  Each
shard replica is a Solr index core.  The Collections API, which is most
likely what you are calling in SolrJ when you get that error, only works
in SolrCloud mode.

Standalone mode only has cores.  They are not called collections.

You can use the CoreAdmin API in standalone mode, but be aware of the
large warning box here titled "CREATE must be able to find a configuration":

https://lucene.apache.org/solr/guide/7_4/coreadmin-api.html

Typically, filesystem access is required to create the configuration
when running in standalone mode, before the core can be created.  If you
want to be able to create indexes completely remotely, that is a whole
lot easier if Solr is running in SolrCloud mode.

Something that the documentation for the CoreAdmin API doesn't say, but
probably should, is that in most usage, instanceDir and dataDir should
not be specified.  The instanceDir will default to the same name as the
core, and it will live in the solr home.  The dataDir defaults to
"./data" relative to the instanceDir, and this is usually the best
option.  Changing these is an expert option.

Thanks,
Shawn


Mime
View raw message