Infinite loop in AndMaybeMatcher.skip_to_quality()

Issue #494 new
Anonymous created an issue

I'm encountering an infinite loop in AndMaybeMatcher.skip_to_quality()

Stack: skip_to_quality, binary.py:780 matches, collectors.py:409 collect_matches, collectors.py:737 run, collectors.py:144 search_with_collector, searching.py:819 search, searching.py:786

Variables a = IntersectionMatcher(IntersectionMatcher(UnionMatcher(UnionMatcher(W3LeafMatcher(('phrase', b'1ml'), True), UnionMatcher(W3LeafMatcher(('includes', b'pipet'), False), W3LeafMatcher(('capacity', b'1ml'), True))), W3LeafMatcher(('phrase', b'serological'), True)), W3LeafMatcher(('type', b'serological'), True)), W3LeafMatcher(('type', b'pipet'), True)) aq = 61.176883761923335 b = W3LeafMatcher(('phrase', b'pipet'), True) bq = 4.324152655016125 minquality = 65.50103641693946 self = AndMaybeMatcher(IntersectionMatcher(IntersectionMatcher(UnionMatcher(UnionMatcher(W3LeafMatcher(('phrase', b'1ml'), True), UnionMatcher(W3LeafMatcher(('includes', b'pipet'), False), W3LeafMatcher(('capacity', b'1ml'), True))), W3LeafMatcher(('phrase', b'serological'), True)), W3LeafMatcher(('type', b'serological'), True)), W3LeafMatcher(('type', b'pipet'), True)), W3LeafMatcher(('phrase', b'pipet'), True)) skipped = 0

The while loop never ends. It goes into the else clause, where skipped always remains zero and bq remains unchanged.

The whoosh entrypoint is this point in my code: og = qparser.OrGroup query = MultifieldParser(schema.names(), schema, group=og).parse(phrase) searcher.search(query, mask=whoosh.query.Term("id", pid), limit=5) ^ infinite loop

Comments (2)

  1. Steven Nicolaou

    This happens for both default scoring and TF_IDF but each on a different query.

    For default scoring the query is "66 gal Pop Up Pools" For TF_IDF the query is "1mL Serological Pipet"

  2. Log in to comment