lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1051844 - in /lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/codecs/sep: SepPostingsReaderImpl.java SepPostingsWriterImpl.java
Date Wed, 22 Dec 2010 11:18:06 GMT
Author: mikemccand
Date: Wed Dec 22 11:18:06 2010
New Revision: 1051844

URL: http://svn.apache.org/viewvc?rev=1051844&view=rev
Log:
don't store silly 0 if field doesn't use payloads

Modified:
    lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/codecs/sep/SepPostingsReaderImpl.java
    lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/codecs/sep/SepPostingsWriterImpl.java

Modified: lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/codecs/sep/SepPostingsReaderImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/codecs/sep/SepPostingsReaderImpl.java?rev=1051844&r1=1051843&r2=1051844&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/codecs/sep/SepPostingsReaderImpl.java
(original)
+++ lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/codecs/sep/SepPostingsReaderImpl.java
Wed Dec 22 11:18:06 2010
@@ -287,9 +287,10 @@ public class SepPostingsReaderImpl exten
         //System.out.println("  freqIndex=" + freqIndex + " posIndex=" + posIndex);
         
         posIndex.read(docReader, true);
-        // nocommit -- only store this if storePayloads is true
-        // skip payload offset
-        IntIndexInput.readVLong(docReader);
+        if (storePayloads) {
+          // skip payload offset
+          IntIndexInput.readVLong(docReader);
+        }
       } else {
         freq = 1;
       }
@@ -521,7 +522,9 @@ public class SepPostingsReaderImpl exten
       posSeekPending = true;
       payloadPending = false;
 
-      payloadOffset = IntIndexInput.readVLong(docReader);
+      if (storePayloads) {
+        payloadOffset = IntIndexInput.readVLong(docReader);
+      }
       //System.out.println("  payloadOffset=" + payloadOffset);
       skipOffset = IntIndexInput.readVLong(docReader);
       //System.out.println("  skipOffset=" + skipOffset);
@@ -918,9 +921,10 @@ public class SepPostingsReaderImpl exten
           freqIndex.seek(freqReader);
         }
         posIndex.read(docReader, true);
-        // skip payload offset -- nocommit only store this
-        // if field has payloads
-        IntIndexInput.readVLong(docReader);
+        if (storePayloads) {
+          // skip payload offset
+          IntIndexInput.readVLong(docReader);
+        }
       }
 
       skipOffset = IntIndexInput.readVLong(docReader);

Modified: lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/codecs/sep/SepPostingsWriterImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/codecs/sep/SepPostingsWriterImpl.java?rev=1051844&r1=1051843&r2=1051844&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/codecs/sep/SepPostingsWriterImpl.java
(original)
+++ lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/codecs/sep/SepPostingsWriterImpl.java
Wed Dec 22 11:18:06 2010
@@ -179,7 +179,9 @@ public final class SepPostingsWriterImpl
       if (!omitTF) {
         freqIndex.write(docOut, true);
         posIndex.write(docOut, true);
-        docOut.writeVLong(payloadStart);
+        if (fieldInfo.storePayloads) {
+          docOut.writeVLong(payloadStart);
+        }
       }
       // nocommit -- only write if docFreq > skipInterval?
       docOut.writeVLong(skipOut.getFilePointer());



Mime
View raw message