[pylucene-dev] can't override QueryParser.parse()
janssen at parc.com
Tue Nov 13 11:49:07 PST 2007
> Of course, there can be catches, such as returning data in an array passed in
> as argument (not directly supported) or, as is the case with QueryParser and
> MultiFieldQueryParser where the latter is a subclass of the former but the
> latter declares a static parse() clashing with the non-static parse() method
> on the former. With python, this is somewhat problematic.
Yes, I seem to have gotten around that by calling
Although I'm now getting this exception:
File "indexing.py", line 211, in parseQ
query = QueryParser.parse(self, querystring)
where "self" is a subtype of PythonMultiFieldQueryParser.
So maybe it doesn't work perfectly :-). Be nice to know just where
that AttributeError is being raised.
> Or, you could do the same in Python directly, have your
> parseQuery() method be defined in your Python subclass of
> PythonMultiFieldQueryParser, have it call parse() and do the customization
Yes, that's what I did.
More information about the pylucene-dev