lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Rowe <>
Subject Re: Lucene searching class
Date Thu, 25 Oct 2007 18:13:52 GMT
Hi Pooja,

poojasreejith wrote:
>   I am using lucene2.2.0 for my application. I have a class.
> The problem I am facing is, it is not supporting 
> Query query = QueryParser.parse(q, "contents",new StandardAnalyzer());  it
> shows error; the method parse in the type QueryParser is not applicable for
> the (String, String ,StandardAnalyzer).

Your code uses an obsolete static version of QueryParser.parse().  That
method was deprecated in Lucene Java release 1.9.0, and was then removed
in release 2.0.0.

You should instead instantiate a QueryParser instance, supplying the
field name and analyzer to the constructor, and then call the
parse(String query) instance method.

Here is the 2.2.0 javadoc for QueryParser:



Steve Rowe
Center for Natural Language Processing

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message