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 yo...@apache.org on 2009/10/08 21:05:07 UTC

svn commit: r823281 - in /lucene/solr/trunk: example/solr/conf/solrconfig.xml src/java/org/apache/solr/update/SolrIndexWriter.java

Author: yonik
Date: Thu Oct  8 19:05:06 2009
New Revision: 823281

URL: http://svn.apache.org/viewvc?rev=823281&view=rev
Log:
SOLR-1145: handle parentless infoStream file, move example to mainIndex, uncomment and set to false by default.

Modified:
    lucene/solr/trunk/example/solr/conf/solrconfig.xml
    lucene/solr/trunk/src/java/org/apache/solr/update/SolrIndexWriter.java

Modified: lucene/solr/trunk/example/solr/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/example/solr/conf/solrconfig.xml?rev=823281&r1=823280&r2=823281&view=diff
==============================================================================
--- lucene/solr/trunk/example/solr/conf/solrconfig.xml (original)
+++ lucene/solr/trunk/example/solr/conf/solrconfig.xml Thu Oct  8 19:05:06 2009
@@ -87,10 +87,6 @@
      -->
     <!--<mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>-->
 
-    <!--  To aid in advanced debugging, you may turn on IndexWriter debug logging.
-     Uncommenting this and setting to true will set the file that the underlying
-     Lucene IndexWriter will write its debug infostream to.  -->
-	  <!-- <infoStream file="/path/file">false</infoStream> -->
 	  
     <!--
       This option specifies which Lucene LockFactory implementation to use.
@@ -165,6 +161,11 @@
       -->
     </deletionPolicy>
 
+    <!--  To aid in advanced debugging, you may turn on IndexWriter debug logging.
+      Setting to true will set the file that the underlying Lucene IndexWriter
+      will write its debug infostream to.  -->
+     <infoStream file="INFOSTREAM.txt">false</infoStream> 
+
   </mainIndex>
 
   <!--	Enables JMX if and only if an existing MBeanServer is found, use this

Modified: lucene/solr/trunk/src/java/org/apache/solr/update/SolrIndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/update/SolrIndexWriter.java?rev=823281&r1=823280&r2=823281&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/update/SolrIndexWriter.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/update/SolrIndexWriter.java Thu Oct  8 19:05:06 2009
@@ -99,7 +99,8 @@
       String infoStreamFile = config.infoStreamFile;
       if (infoStreamFile != null) {
         File f = new File(infoStreamFile);
-        f.getParentFile().mkdirs();
+        File parent = f.getParentFile();
+        if (parent != null) parent.mkdirs();
         FileOutputStream fos = new FileOutputStream(f, true);
         infoStream = new TimeLoggingPrintStream(fos, true);
         setInfoStream(infoStream);