Reload schema.xml

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

Reload schema.xml

Debra-3
This post was updated on .
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: Reload schema.xml

Chris Hostetter-3

: Is there a way to reload schema.xml while solr is running?

Afraid not ...there's a lot of interdependencies between the way the
IndexSchema, the RequestHandlers, the SolrCore, and updates work ... so i
supsect atttempting to add something like that would require a lot of
tricky synchronization interaction to get it working safetly ... which
owuld not only be hard to do, but might also have some adverse impacts on
the more common case: a long runningsystem with a constant IndexSchema.

It also wouldn't address a more fundemental issue: many schema.xml changes
require reindexing.

Your servlet container may provide easy hooks for reloading a webapp
(like Solr) on demand .. you could always trigger that whenever you change
your schema.xml.

(in some containers/configs it's a simple matter of touching the solr.war)


-Hoss

Reply | Threaded
Open this post in threaded view
|

Re: Reload schema.xml

Debra-3
That was quick... I was editing my question while you sent the answer.
I would appreciate if you can take a look at the edited question.

Chris Hostetter wrote
: Is there a way to reload schema.xml while solr is running?

Afraid not ...there's a lot of interdependencies between the way the
IndexSchema, the RequestHandlers, the SolrCore, and updates work ... so i
supsect atttempting to add something like that would require a lot of
tricky synchronization interaction to get it working safetly ... which
owuld not only be hard to do, but might also have some adverse impacts on
the more common case: a long runningsystem with a constant IndexSchema.

It also wouldn't address a more fundemental issue: many schema.xml changes
require reindexing.

Your servlet container may provide easy hooks for reloading a webapp
(like Solr) on demand .. you could always trigger that whenever you change
your schema.xml.

(in some containers/configs it's a simple matter of touching the solr.war)


-Hoss
Reply | Threaded
Open this post in threaded view
|

Re: Reload schema.xml

Chris Hostetter-3
: That was quick... I was editing my question while you sent the answer.
: I would appreciate if you can take a look at the edited question.

i'm not sure i understand ... did you send a reply?  i didn't get other
messages from you.

Oh crap ... so you used nabble.com to send your message right? and
apparently nabble let's people edit messages they post in place ... that's
really scary since everybody else on the planet who is subscribed to the
list (and all of the people reading the list archives on other hosts) will
never have any idea what you are talking about.

can you please send a seperate message with your question?


-Hoss