Create a core from scratch trough the API

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Create a core from scratch trough the API

Thomas Mortagne
Hi everyone,

I'm currently testing with Solr Standalone 8.1.1.

I have the following need: through the API Solr standalone create an
empty core and then use the schema API to add what I need. Similar to
create a sql database and then create tables (except that I need only
one table in my case) and columns. The fact that there is a Solr
schema API leaded me to think that creating such an empty core would
be easy but I actually can't find a proper way to do it.

I cannot put each core configuration file in the right filesystem
location before creating it through the API, I want the minimal
configuration files to be generated or (or copied from a pre existing
location on the server at worst).

I was hopping that configsets would be the answer but it seems that
those are not readonly config template as I expected but the actual
configuration files directly used by the core. This means any call to
the schema API unfortunately modify those files which means modify the
schema for all cores created from the same configset. If the configset
is not writable then Solr complain it's not writable and save
modifications in memory. I could not find any property to tell Solr to
copy the configset instead of using it directly but maybe I missed it.

Is this use case not possible with Solr Standalone or did I missed
something obvious ? My version is too old and there is something in
more recent version ?

Thanks,
--
Thomas Mortagne