Reloading solr schema file

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Reloading solr schema file

Debra-3
Is there a way to reload schema.xml while solr is running?

As a newbiie Java programmer I'm not sure what happens if I do the following:

SolrCore core = new SolrCore(null,null);

Will it replace the current core? What happens to requests that are running?


What if I do?

SolrCore core =SolrCore.getSolrCore();
core=null; // first core.close(); ??
core =SolrCore.getSolrCore();



TIA
Debra
Reply | Threaded
Open this post in threaded view
|

Re: Reloading solr schema file

Chris Hostetter-3
: As a newbiie Java programmer I'm not sure what happens if I do the
: following:
:
: SolrCore core = new SolrCore(null,null);
:
: Will it replace the current core? What happens to requests that are running?

I think the best answer to that question is "undefined behavior" ...
that's not a situation Solr was really designed for, so i don't know that
the neccessary bulletproofing has been put into place to make it feasible.

Consider all of instances in the code base where SolrCore.getSolrCore() is
called ... if the core is changed in mid request, you could get some
extremely odd behavior.


-Hoss