SOLR-4417: Reopen the IndexWriter on SolrCore reload.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1447084 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2013-02-17 21:46:13 +00:00
parent 608998e97c
commit d51e6f2c29
2 changed files with 7 additions and 1 deletions

View File

@ -79,6 +79,8 @@ New Features
* SOLR-3855: Doc values support. (Adrien Grand)
* SOLR-4417: Reopen the IndexWriter on SolrCore reload. (Mark Miller)
Bug Fixes
----------------------

View File

@ -386,7 +386,6 @@ public final class SolrCore implements SolrInfoMBean {
public SolrCore reload(SolrResourceLoader resourceLoader, SolrCore prev) throws IOException,
ParserConfigurationException, SAXException {
// TODO - what if indexwriter settings have changed
SolrConfig config = new SolrConfig(resourceLoader,
getSolrConfig().getName(), null);
@ -399,6 +398,11 @@ public final class SolrCore implements SolrInfoMBean {
SolrCore core = new SolrCore(getName(), getDataDir(), config,
schema, coreDescriptor, updateHandler, prev);
core.solrDelPolicy = this.solrDelPolicy;
core.getUpdateHandler().getSolrCoreState().newIndexWriter(core, false, false);
core.getSearcher(true, false, null, true);
return core;
}