Commits

Matt Chaput  committed c156870

Extremely minor fixes.

  • Participants
  • Parent commits b7e0a65

Comments (0)

Files changed (2)

File src/whoosh/filedb/filepostings.py

         self._term = term
         self.stringids = stringids
         
-        magic = postfile.get_int(offset)
-        self.blockclass = postblocks.magic_map[magic]
+        self.magic = postfile.get_int(offset)
+        self.blockclass = postblocks.magic_map[self.magic]
         
         self.blockcount = postfile.get_uint(offset + _INT_SIZE)
         self.baseoffset = offset + _INT_SIZE * 2
     def __repr__(self):
         r = "%s(%r, %r, %s" % (self.__class__.__name__, str(self.postfile),
                                self._term, self.is_active())
-        if self.is_active():
+        if self.is_active() and self.i < len(self.block.ids):
             r += ", %r" % self.id()
         r += ")"
         return r

File src/whoosh/filedb/filereading.py

         tf = storage.open_file(segment.termsindex_filename)
         self.termsindex = TermIndexReader(tf)
         
-        # Term postings file, vector index, and vector postings: lazy load
-        self.postfile = None
+        # Term vector index, and vector postings: lazy load
         self.vectorindex = None
         self.vpostfile = None