lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject cvs commit: jakarta-lucene/src/java/org/apache/lucene/index IndexWriter.java
Date Sat, 20 Oct 2001 02:32:59 GMT
cutting     01/10/19 19:32:59

  Modified:    src/java/org/apache/lucene/index IndexWriter.java
  Log:
  Fixed a bug where adding an optimized index to an empty index failed.
  
  Revision  Changes    Path
  1.3       +2 -1      jakarta-lucene/src/java/org/apache/lucene/index/IndexWriter.java
  
  Index: IndexWriter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/index/IndexWriter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- IndexWriter.java	2001/09/27 16:27:01	1.2
  +++ IndexWriter.java	2001/10/20 02:32:59	1.3
  @@ -206,7 +206,8 @@
       flushRamSegments();
       while (segmentInfos.size() > 1 ||
   	   (segmentInfos.size() == 1 &&
  -	    SegmentReader.hasDeletions(segmentInfos.info(0)))){
  +	    (SegmentReader.hasDeletions(segmentInfos.info(0)) ||
  +             segmentInfos.info(0).dir != directory))) {
         int minSegment = segmentInfos.size() - mergeFactor;
         mergeSegments(minSegment < 0 ? 0 : minSegment);
       }
  
  
  

Mime
View raw message