On 10/17/2013 12:51 PM, Christopher Gross wrote:
OK, super confused now.
http://index1:8080/solr/admin/cores?action=CREATE&name=test2&collection=test2&numshards=1&replicationFactor=3
Nets me this:
<response>
<lst name="responseHeader">
<int name="status">400</int>
<int name="QTime">15007</int>
</lst>
<lst name="error">
<str name="msg">Error CREATEing SolrCore 'test2': Could not find configName
for collection test2 found:[xxx, xxx, xxxx, xxxxx, xxxxxx]</str>
<int name="code">400</int>
</lst>
</response>
For that node (test2), in my solr data directory, I have a folder with the
conf files and an existing data dir (copied the index from another
location).
Right now it seems like the only way that I can add in a collection is to
load the configs into zookeeper, stop tomcat, add it to the solr.xml file,
and restart tomcat.
The config does need to be loaded into zookeeper. That's how SolrCloud
works.
Because you have existing collections, you're going to have at least one
config set already uploaded, you may be able to use that directly. You
don't need to stop anything, though. Michael Della Bitta's response
indicates the part you're missing on your create URL - the
collection.configName parameter.
The basic way to get things done with collections is this:
1) Upload one or more named config sets to zookeeper. This can be done
with zkcli and its "upconfig" command, or with the bootstrap startup
options that are intended to be used once.
2) Create the collection, referencing the proper collection.configName.
You can have many collections that all share one config name. You can
also change which config an existing collection uses with the zkcli
"linkconfig" command, followed by a collection reload. If you upload a
new configuration with an existing name, a collection reload (or Solr
restart) is required to use the new config.
For uploading configs, I find zkcli to be a lot cleaner than the
bootstrap options - it doesn't require stopping Solr or giving it
different startup options. Actually, it doesn't even require Solr to be
started - it talks only to zookeeper, and we strongly recommend
standalone zookeeper, not the zk server that can be run embedded in Solr.
Thanks,
Shawn