[pylucene-dev] can't override QueryParser.parse()

Andi Vajda vajda at osafoundation.org
Tue Nov 13 19:17:34 PST 2007


On Tue, 13 Nov 2007, Bill Janssen wrote:

> Try this:
>
>  from lucene import initVM, CLASSPATH
>  from lucene import QueryParser, StandardAnalyzer, PythonMultiFieldQueryParser
>
>  initVM(classpath=CLASSPATH)
>
>  class MyQueryParser (PythonMultiFieldQueryParser):
>
>      pass
>
>  p = MyQueryParser(['bletch', 'unbletch'], StandardAnalyzer())
>  print QueryParser.parse(p, "foo AND bar")

Did you actually try this ?
It crashes for me. It's not reproducing the error you're reporting.
I'm trying to figure out why...

Andi..



More information about the pylucene-dev mailing list