mirror of https://github.com/apache/lucene.git
SOLR-1527 -- shareSchema does not work with absolute paths
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@830938 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
82955637e6
commit
31ce47e759
|
@ -406,9 +406,12 @@ public class CoreContainer
|
|||
IndexSchema schema = null;
|
||||
if(indexSchemaCache != null){
|
||||
//schema sharing is enabled. so check if it already is loaded
|
||||
File schemFile = new File(solrLoader.getInstanceDir() + "conf" + File.separator + dcore.getSchemaName());
|
||||
if(schemFile. exists()){
|
||||
String key = schemFile.getAbsolutePath()+":"+new SimpleDateFormat("yyyyMMddhhmmss").format(new Date(schemFile.lastModified()));
|
||||
File schemaFile = new File(dcore.getSchemaName());
|
||||
if (!schemaFile.isAbsolute()) {
|
||||
schemaFile = new File(solrLoader.getInstanceDir() + "conf" + File.separator + dcore.getSchemaName());
|
||||
}
|
||||
if(schemaFile. exists()){
|
||||
String key = schemaFile.getAbsolutePath()+":"+new SimpleDateFormat("yyyyMMddhhmmss").format(new Date(schemaFile.lastModified()));
|
||||
schema = indexSchemaCache.get(key);
|
||||
if(schema == null){
|
||||
log.info("creating new schema object for core: " + dcore.name);
|
||||
|
|
Loading…
Reference in New Issue