Commits

Matt Chaput committed 357984f

Fixed a bug in collect() when matcher.replace() returned a NullMatcher

Comments (0)

Files changed (1)

src/whoosh/searching.py

             id = matcher.id()
             h.append((matcher.score(), id))
             docs.add(id)
-            if replace: matcher = matcher.replace()
+            if replace:
+                matcher = matcher.replace()
+                if not matcher.is_active():
+                    break
             matcher.next()
     else:
         # Heap of (score, docnum, postingquality) tuples