lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r151390 - in lucene/java/trunk: CHANGES.txt src/java/org/apache/lucene/index/SegmentMerger.java
Date Fri, 04 Feb 2005 19:09:54 GMT
Author: cutting
Date: Fri Feb  4 11:09:53 2005
New Revision: 151390

URL: http://svn.apache.org/viewcvs?view=rev&rev=151390
Log:
Fix for bug #32847.  Use uncached access to norms when merging to
minimize RAM usage.

Modified:
    lucene/java/trunk/CHANGES.txt
    lucene/java/trunk/src/java/org/apache/lucene/index/SegmentMerger.java

Modified: lucene/java/trunk/CHANGES.txt
URL: http://svn.apache.org/viewcvs/lucene/java/trunk/CHANGES.txt?view=diff&r1=151389&r2=151390
==============================================================================
--- lucene/java/trunk/CHANGES.txt (original)
+++ lucene/java/trunk/CHANGES.txt Fri Feb  4 11:09:53 2005
@@ -140,16 +140,21 @@
     of 0 now run 20-50% faster (Patch #31882).
     (Jonathan Hager via Daniel Naber)
     
- 6. A Version of BooleanScorer (BooleanScorer2) added that delivers documents 
-    in  increasing order and implements skipTo. For queries with required or forbidden 
-    clauses it may be faster than the old BooleanScorer, for BooleanQueries consisting 
-    only of optional clauses it is probably slower. The new BooleanScorer is now the 
+ 6. A Version of BooleanScorer (BooleanScorer2) added that delivers
+    documents in increasing order and implements skipTo. For queries
+    with required or forbidden clauses it may be faster than the old
+    BooleanScorer, for BooleanQueries consisting only of optional
+    clauses it is probably slower. The new BooleanScorer is now the
     default. (Patch 31785 by Paul Elschot via Christoph)
 
+ 7. Use uncached access to norms when merging to reduce RAM usage.
+    (Bug #32847).  (Doug Cutting)
+
  Infrastructure
 
- 1. Lucene's source code repository has converted from CVS to Subversion.  The new
-    repository is at http://svn.apache.org/repos/asf/lucene/java/trunk
+ 1. Lucene's source code repository has converted from CVS to
+    Subversion.  The new repository is at
+    http://svn.apache.org/repos/asf/lucene/java/trunk
 
 1.4.3
 

Modified: lucene/java/trunk/src/java/org/apache/lucene/index/SegmentMerger.java
URL: http://svn.apache.org/viewcvs/lucene/java/trunk/src/java/org/apache/lucene/index/SegmentMerger.java?view=diff&r1=151389&r2=151390
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/SegmentMerger.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/SegmentMerger.java Fri Feb  4 11:09:53
2005
@@ -392,12 +392,12 @@
         try {
           for (int j = 0; j < readers.size(); j++) {
             IndexReader reader = (IndexReader) readers.elementAt(j);
-            byte[] input = reader.norms(fi.name);
             int maxDoc = reader.maxDoc();
+            byte[] input = new byte[maxDoc];
+            reader.norms(fi.name, input, 0);
             for (int k = 0; k < maxDoc; k++) {
-              byte norm = input != null ? input[k] : (byte) 0;
               if (!reader.isDeleted(k)) {
-                output.writeByte(norm);
+                output.writeByte(input[k]);
               }
             }
           }



---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message