diff --git a/CHANGES.txt b/CHANGES.txt index 6f6b4e55bf7..8456f7b9b6d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -140,16 +140,21 @@ Optimizations 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 diff --git a/src/java/org/apache/lucene/index/SegmentMerger.java b/src/java/org/apache/lucene/index/SegmentMerger.java index 423d631e4a2..197820211ad 100644 --- a/src/java/org/apache/lucene/index/SegmentMerger.java +++ b/src/java/org/apache/lucene/index/SegmentMerger.java @@ -392,12 +392,12 @@ final class SegmentMerger { 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]); } } }