[pylucene-dev] can't override QueryParser.parse()
janssen at parc.com
Tue Nov 13 18:57:24 PST 2007
> Then, I'm confused as to what the 'exc' object is. My understanding of
> PyErr_Fetch() is that 'exc' is the error class, which is checked against
> PyExc_JavaError, a python class that's supposed to have a method on it called
> getJavaException() which in turn returns the actual Java Throwable instance,
> and 'value' is the actual error instance. The docs  are not very explicit.
> Calling getJavaException() on a Throwable makes no sense.
Looking at it with GDB, the 'exc' object is in fact the 'JavaError'
type object. But it's not the type object of the 'value' object.
Where's the code that takes a Java error and turns it into the Python
The problem I'm seeing appears to be some issue with the
getBooleanQuery() instance on
> Again, if you send me code that reproduces the problem, I can make more sense
> and fix the bug, if there is one.
from lucene import initVM, CLASSPATH
from lucene import QueryParser, StandardAnalyzer, PythonMultiFieldQueryParser
class MyQueryParser (PythonMultiFieldQueryParser):
p = MyQueryParser(['bletch', 'unbletch'], StandardAnalyzer())
print QueryParser.parse(p, "foo AND bar")
More information about the pylucene-dev