On 8/24/24 13:59, org.apache.s...@io7m.com wrote:
Hello.

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.

There's a collection API that allows me to create the collection. That
works without issue.

The only API I can find with schemas requires me to provide a long
series of "add-field", "add-field-type", etc, commands to manipulate an
existing schema. That's not good; I have the exact schema.xml file
already - how do I tell the server that I want exactly that file?

There's a ConfigSets API that purports to allow for specifying a schema
that will be used for collections, but it also seems to require me to
specify all kinds of information that I don't know. My use case is that
I'm an application that wants to create a collection with a specific
schema, but otherwise all administrative information (like the number of
shards, replicas, other installation-specific information that I can't
know as an application) should be left to the Solr administrator.

If the application specified the number of shards and replicas when it created the collection, it should know what it asked for.

While I agree that an easy button for uploading a complete schema.xml could be convenient in some cases, I don't know if it's that simple to implement... whereas writing a script to transform schema.xml into a series of curl commands, is.

Dima


Reply via email to