correct_query error: _suggestions() takes exactly 5 arguments (4 given)
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 "/app.py", line 412, in search corrected = searcher.correct_query(cquery, qstring, prefix=1, correctors=correctors) File "/opt/virtualenvs/tn/lib/python2.7/site-packages/whoosh/searching.py", line 904, in correct_query return sqc.correct_query(q, qstring) File "/opt/virtualenvs/tn/lib/python2.7/site-packages/whoosh/spelling.py", line 299, in correct_query maxdist=maxdist) File "/opt/virtualenvs/tn/lib/python2.7/site-packages/whoosh/spelling.py", 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.