On Jun 25, 2005, at 7:59 AM, John Fereira wrote:
Aha! Look at the method signature of your parse() call. That is the
culprit. To call the non-static method so that you use the
*instance* of QueryParser rather than the default settings, change to
this:
query = qp.parse(searchterms);
Thanks, that fixed it.
Was there someplace that I should have looked to determine that
qp.parse(String) would call the non-static method but qp.parse
(String, String, Analyzer) would not?
Besides Daniel's comment about IDE's warning of this (calling a
static method from an instance variable is usually a warning), you
can also glean this information from Lucene's Javadocs. The static
parse method is more trouble than its worth, actually. We should
probably deprecate that for 1.9 and remove it in 2.0 and only allow
QueryParser instances - this allows more flexibility with things like
MultiFieldQueryParser and such too.
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]