[pylucene-dev] Bug in sample files
Andi Vajda
vajda at osafoundation.org
Wed May 31 09:12:58 PDT 2006
On Wed, 31 May 2006, Ken Kinder wrote:
> In SearchFiles.py, when you run a query, you get:
>
> Traceback (most recent call last):
> File "SearchFiles.py", line 37, in ?
> run(searcher, analyzer)
> File "SearchFiles.py", line 24, in run
> query = QueryParser.parse(command, "contents", analyzer)
> TypeError: descriptor 'parse' requires a 'PyLucene.QueryParser' object but
> received a 'str'
>
> Looks like it expects an instance of PyLucene.QueryParser?
Yes, that is a left over from pre-2.0 APIs. Line 24 should say:
query = QueryParser("contents", analyzer).parse(command)
Andi..
More information about the pylucene-dev
mailing list