Matt Chaput avatar Matt Chaput committed c156870

Extremely minor fixes.

Comments (0)

Files changed (2)

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

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
         
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.