You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by ry...@apache.org on 2007/12/21 02:43:36 UTC

svn commit: r606084 - in /lucene/solr/trunk/src: java/org/apache/solr/search/function/FileFloatSource.java test/org/apache/solr/search/function/TestFunctionQuery.java

Author: ryan
Date: Thu Dec 20 17:43:33 2007
New Revision: 606084

URL: http://svn.apache.org/viewvc?rev=606084&view=rev
Log:
SOLR-442 -- change indexDir to dataDir for FileFloatSource 

Modified:
    lucene/solr/trunk/src/java/org/apache/solr/search/function/FileFloatSource.java
    lucene/solr/trunk/src/test/org/apache/solr/search/function/TestFunctionQuery.java

Modified: lucene/solr/trunk/src/java/org/apache/solr/search/function/FileFloatSource.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/search/function/FileFloatSource.java?rev=606084&r1=606083&r2=606084&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/search/function/FileFloatSource.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/search/function/FileFloatSource.java Thu Dec 20 17:43:33 2007
@@ -38,13 +38,13 @@
   private final SchemaField keyField;
   private final float defVal;
 
-  private final String indexDir;
+  private final String dataDir;
 
   public FileFloatSource(SchemaField field, SchemaField keyField, float defVal, QParser parser) {
     this.field = field;
     this.keyField = keyField;
     this.defVal = defVal;
-    this.indexDir = parser.getReq().getCore().getIndexDir();
+    this.dataDir = parser.getReq().getCore().getDataDir();
   }
 
   public String description() {
@@ -86,7 +86,7 @@
     return this.field.getName().equals(other.field.getName())
             && this.keyField.getName().equals(other.keyField.getName())
             && this.defVal == other.defVal
-            && this.indexDir.equals(other.indexDir);
+            && this.dataDir.equals(other.dataDir);
   }
 
   public int hashCode() {
@@ -95,7 +95,7 @@
 
   public String toString() {
     return "FileFloatSource(field="+field.getName()+",keyField="+keyField.getName()
-            + ",defVal="+defVal+",indexDir="+indexDir+")";
+            + ",defVal="+defVal+",dataDir="+dataDir+")";
 
   }
 
@@ -184,7 +184,7 @@
     InputStream is;
     String fname = "external_" + ffs.field.getName();
     try {
-      is = getLatestFile(ffs.indexDir, fname);
+      is = getLatestFile(ffs.dataDir, fname);
     } catch (IOException e) {
       // log, use defaults
       SolrCore.log.severe("Error opening external value source file: " +e);

Modified: lucene/solr/trunk/src/test/org/apache/solr/search/function/TestFunctionQuery.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/org/apache/solr/search/function/TestFunctionQuery.java?rev=606084&r1=606083&r2=606084&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/org/apache/solr/search/function/TestFunctionQuery.java (original)
+++ lucene/solr/trunk/src/test/org/apache/solr/search/function/TestFunctionQuery.java Thu Dec 20 17:43:33 2007
@@ -52,7 +52,7 @@
 
   String base = "external_foo_extf";
   void makeExternalFile(String field, String contents, String charset) {
-    String dir = h.getCore().getIndexDir();
+    String dir = h.getCore().getDataDir();
     String filename = dir + "/external_" + field + "." + System.currentTimeMillis();
     try {
       Writer out = new OutputStreamWriter(new FileOutputStream(filename), charset);