Commits

Matt Chaput  committed 35c15d8

Fix for IntersectionMatcher.skip_to_quality calling next() on inactive submatchers. Fixes issue #310.

  • Participants
  • Parent commits a86e744

Comments (0)

Files changed (1)

File src/whoosh/matching/binary.py

                 # quality when added to B
                 sk = a.skip_to_quality(minquality - bq)
                 skipped += sk
-                if not sk:
+                if not sk and a.is_active():
                     # The matcher couldn't skip ahead for some reason, so just
                     # advance and try again
                     a.next()
                 # And vice-versa
                 sk = b.skip_to_quality(minquality - aq)
                 skipped += sk
-                if not sk:
+                if not sk and b.is_active():
                     b.next()
 
             if not a.is_active() or not b.is_active():