lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From busc...@apache.org
Subject svn commit: r599264 - in /lucene/java/trunk: CHANGES.txt src/java/org/apache/lucene/index/SegmentMerger.java src/test/org/apache/lucene/index/TestPayloads.java
Date Thu, 29 Nov 2007 04:43:04 GMT
Author: buschmi
Date: Wed Nov 28 20:43:03 2007
New Revision: 599264

URL: http://svn.apache.org/viewvc?rev=599264&view=rev
Log:
LUCENE-1071: Fixed SegmentMerger to correctly set payload bit in the merged segment.

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

Modified: lucene/java/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/trunk/CHANGES.txt?rev=599264&r1=599263&r2=599264&view=diff
==============================================================================
--- lucene/java/trunk/CHANGES.txt (original)
+++ lucene/java/trunk/CHANGES.txt Wed Nov 28 20:43:03 2007
@@ -168,6 +168,9 @@
 23. LUCENE-1050: Throw LockReleaseFailedException in
     Simple/NativeFSLockFactory if we fail to delete the lock file when
     releasing the lock.  (Nikolay Diakov via Mike McCandless)
+
+24. LUCENE-1071: Fixed SegmentMerger to correctly set payload bit in 
+    the merged segment. (Michael Busch)
     
 New features
 

Modified: lucene/java/trunk/src/java/org/apache/lucene/index/SegmentMerger.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/SegmentMerger.java?rev=599264&r1=599263&r2=599264&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/SegmentMerger.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/SegmentMerger.java Wed Nov 28 20:43:03
2007
@@ -221,7 +221,7 @@
         SegmentReader segmentReader = (SegmentReader) reader;
         for (int j = 0; j < segmentReader.getFieldInfos().size(); j++) {
           FieldInfo fi = segmentReader.getFieldInfos().fieldInfo(j);
-          fieldInfos.add(fi.name, fi.isIndexed, fi.storeTermVector, fi.storePositionWithTermVector,
fi.storeOffsetWithTermVector, !reader.hasNorms(fi.name));
+          fieldInfos.add(fi.name, fi.isIndexed, fi.storeTermVector, fi.storePositionWithTermVector,
fi.storeOffsetWithTermVector, !reader.hasNorms(fi.name), fi.storePayloads);
         }
       } else {
         addIndexed(reader, fieldInfos, reader.getFieldNames(IndexReader.FieldOption.TERMVECTOR_WITH_POSITION_OFFSET),
true, true, true, false);

Modified: lucene/java/trunk/src/test/org/apache/lucene/index/TestPayloads.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/index/TestPayloads.java?rev=599264&r1=599263&r2=599264&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/index/TestPayloads.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/index/TestPayloads.java Wed Nov 28 20:43:03
2007
@@ -197,6 +197,9 @@
             writer.addDocument(d);
         }
         
+        // make sure we create more than one segment to test merging
+        writer.flush();
+        
         // now we make sure to have different payload lengths next at the next skip point
       
         for (int i = 0; i < numDocs; i++) {
             analyzer.setPayloadData(fieldName, payloadData, offset, i);



Mime
View raw message