On 8/24/2024 12:59, org.apache.s...@io7m.com wrote:
I have a schema.xml file locally. I want to create a new collection
programmatically, and set the schema for that collection to be exactly
the contents of schema.xml. No more, no less.
<snip>
There's a ConfigSets API that purports to allow for specifying a schema
The ConfigSet API is for maintaining configsets. There is a way to use
configsets in standalone mode, but SolrCloud is preferred.
A configset consists of solrconfig.xml, managed-schema.xml (or
schema.xml if using the classic schema factory), and any other files
referenced by those two configs. You can't just upload the schema, you
must also have the solrconfig.
https://solr.apache.org/guide/solr/latest/configuration-guide/configsets-api.html
Each configset stored in ZK has a name, and that name is used when
creating a collection. An existing collection can be altered to use a
different config name, and reloading the collection will activate the
change.
To answer your question from another thread, SolrCloud is the preferred
way to run Solr. It would not surprise me if an upcoming major version
of Solr will ONLY run in cloud mode. Some of Solr's more advanced
features will only work in cloud mode.
For simple single-node non-mission-critical situations where redundancy
and replicas aren't a requirement, you can run Solr with an embedded ZK.
I have a Solr install that works this way. If you do need high
availability and/or multiple replicas, this isn't recommended.
Thanks,
Shawn