Hi Pooja,

poojasreejith wrote:
>   I am using lucene2.2.0 for my application. I have a searcher.java 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:

<http://lucene.apache.org/java/2_2_0/api/org/apache/lucene/queryParser/QueryParser.html>

Steve

-- 
Steve Rowe
Center for Natural Language Processing
http://www.cnlp.org/tech/lucene.asp

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to