1. Matt Chaput
  2. whoosh
Issue #159 resolved

multitoken_query="phrase" gives TypeError

Thomas Waldmann
created an issue

Phrase class needs the fieldname also, not just the list of words (like Or and And do):

{{{ Traceback (most recent call last): ... File "/home/marchael/Downloads/moin/moin2/test_repo/before_push/moin-2.0/MoinMoin/apps/frontend/views.py", line 145, in _search q = qp.parse(query) File "/home/marchael/Downloads/moin/moin2/test_repo/before_push/moin-2.0/env/lib/python2.6/site-packages/whoosh/qparser/default.py", line 327, in parse q = nodes.query(self) File "/home/marchael/Downloads/moin/moin2/test_repo/before_push/moin-2.0/env/lib/python2.6/site-packages/whoosh/qparser/syntax.py", line 235, in query subq = node.query(parser) File "/home/marchael/Downloads/moin/moin2/test_repo/before_push/moin-2.0/env/lib/python2.6/site-packages/whoosh/qparser/syntax.py", line 505, in query removestops=self.removestops) File "/home/marchael/Downloads/moin/moin2/test_repo/before_push/moin-2.0/env/lib/python2.6/site-packages/whoosh/qparser/default.py", line 204, in term_query fieldname, termclass, boost) File "/home/marchael/Downloads/moin/moin2/test_repo/before_push/moin-2.0/env/lib/python2.6/site-packages/whoosh/qparser/default.py", line 173, in multitoken_query for t in texts]) TypeError: init() takes at least 3 arguments (2 given) }}}

Comments (2)

  1. Log in to comment