Issue #319 new

correct_query error: _suggestions() takes exactly 5 arguments (4 given)

created an issue

I upgraded from 2.3.2 to 2.4.1 recently and my spelling correction stopped working due to the exception w/ stack trace below. I downgraded to 2.3.2 and everything worked again. I checked the docs but it doesn't appear that the spelling correction interface changed between the versions.

  File "/", line 412, in search
    corrected = searcher.correct_query(cquery, qstring, prefix=1,
"/opt/virtualenvs/tn/lib/python2.7/site-packages/whoosh/", line
904, in correct_query
    return sqc.correct_query(q, qstring)
"/opt/virtualenvs/tn/lib/python2.7/site-packages/whoosh/", line
299, in correct_query
"/opt/virtualenvs/tn/lib/python2.7/site-packages/whoosh/", line
69, in suggest
    for item in _suggestions(text, k, prefix):
TypeError: _suggestions() takes exactly 5 arguments (4 given)

The correctors variable was defined as:

correctors = dict(a=ReaderCorrectorFix(searcher.reader(), 'a'))

I'm using Whoosh as an in-memory index.

Comments (1)

  1. Log in to comment