Author: noble
Date: Thu May 28 05:28:39 2009
New Revision: 779442
URL: http://svn.apache.org/viewvc?rev=779442&view=rev
Log:
SOLR-920 missed persistence part
Modified:
lucene/solr/trunk/src/java/org/apache/solr/core/CoreContainer.java
Modified: lucene/solr/trunk/src/java/org/apache/solr/core/CoreContainer.java
URL:
http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/core/CoreContainer.java?rev=779442&r1=779441&r2=779442&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/core/CoreContainer.java
(original)
+++ lucene/solr/trunk/src/java/org/apache/solr/core/CoreContainer.java Thu May
28 05:28:39 2009
@@ -71,6 +71,7 @@
protected Properties containerProperties;
protected Map<String ,IndexSchema> indexSchemaCache;
protected String adminHandler;
+ protected boolean shareSchema;
public CoreContainer() {
}
@@ -179,8 +180,8 @@
persistent = cfg.getBool( "solr/@persistent", false );
libDir = cfg.get( "solr/@sharedLib", null);
adminPath = cfg.get( "solr/cores/@adminPath", null );
- String shareSchema = cfg.get( "solr/cores/@shareSchema", null );
- if(Boolean.parseBoolean(shareSchema)){
+ shareSchema = cfg.getBool("solr/cores/@shareSchema", false );
+ if(shareSchema){
indexSchemaCache = new ConcurrentHashMap<String ,IndexSchema>();
}
adminHandler = cfg.get("solr/cores/@adminHandler", null );
@@ -651,6 +652,7 @@
w.write("<cores");
writeAttribute(w, "adminPath",adminPath);
if(adminHandler != null) writeAttribute(w, "adminHandler",adminHandler);
+ if(shareSchema) writeAttribute(w, "shareSchema","true");
w.write(">\n");
Map<SolrCore, LinkedList<String>> aliases = new
HashMap<SolrCore,LinkedList<String>>();