lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject svn commit: r503488 - /lucene/solr/trunk/src/java/org/apache/solr/core/SolrCore.java
Date Sun, 04 Feb 2007 21:33:21 GMT
Author: yonik
Date: Sun Feb  4 13:33:20 2007
New Revision: 503488

URL: http://svn.apache.org/viewvc?view=rev&rev=503488
Log:
change dataDir to return dir containing index

Modified:
    lucene/solr/trunk/src/java/org/apache/solr/core/SolrCore.java

Modified: lucene/solr/trunk/src/java/org/apache/solr/core/SolrCore.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/core/SolrCore.java?view=diff&rev=503488&r1=503487&r2=503488
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/core/SolrCore.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/core/SolrCore.java Sun Feb  4 13:33:20 2007
@@ -102,7 +102,7 @@
   }
 
   public IndexSchema getSchema() { return schema; }
-  public String getDataDir() { return index_path; }
+  public String getDataDir() { return dataDir; }
   public String getIndexDir() { return index_path; }
 
   private final RequestHandlers reqHandlers = new RequestHandlers(SolrConfig.config);
@@ -114,7 +114,7 @@
 
   // gets a non-caching searcher
   public SolrIndexSearcher newSearcher(String name) throws IOException {
-    return new SolrIndexSearcher(schema, name,getDataDir(),false);
+    return new SolrIndexSearcher(schema, name,getIndexDir(),false);
   }
 
 
@@ -129,7 +129,7 @@
         // if it didn't exist already...
         Directory dir = FSDirectory.getDirectory(dirFile, !indexExists);
         if (IndexReader.isLocked(dir)) {
-          log.warning("WARNING: Solr index directory '" + getDataDir() + "' is locked.  Unlocking...");
+          log.warning("WARNING: Solr index directory '" + getIndexDir() + "' is locked. 
Unlocking...");
           IndexReader.unlock(dir);
         }
       }
@@ -140,7 +140,7 @@
         log.warning("Solr index directory '" + dirFile + "' doesn't exist."
                 + " Creating new index...");
 
-        SolrIndexWriter writer = new SolrIndexWriter("SolrCore.initIndex",getDataDir(), true,
schema, mainIndexConfig);
+        SolrIndexWriter writer = new SolrIndexWriter("SolrCore.initIndex",getIndexDir(),
true, schema, mainIndexConfig);
         writer.close();
 
       }



Mime
View raw message