On 6/1/2022 3:34 PM, Christopher Schultz wrote:
So I tried this with configSet=_default and I /did/ get a core created. I didn't get the same thing I got from the CLI:

This is what I get from "solr create -c test_core":

Using bin/solr to create a core does it in multiple steps.  It creates the core directory, and COPIES the named configset's conf directory (using _default if you don't specify one) to the core directory.  Then it calls /solr/admin/cores with "name" and "instanceDir" set to the name you gave it, which finds the just-copied config, creates the core.properties file, and adds the core to the running config.

If I use SolrClient as in your example with configSet=_default, I get:

test_core2
test_core2/core.properties
test_core2/data
test_core2/data/tlog
test_core2/data/snapshot_metadata
test_core2/data/index
test_core2/data/index/segments_1
test_core2/data/index/write.lock

The end result is the same ... except in the second case, it references the configset by name, which will be in the created core.properties file.  If you were to change the config in the configset directory and then reload each core, test_core would not see the changes, but test_core2 would.  That's because test_core has a complete copy of the config that is separate from the configset, and test_core2 is referencing the configset.

Thanks,
Shawn

Reply via email to