You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by poojasreejith <po...@pivotsys.com> on 2007/10/25 19:38:34 UTC
Lucene searching class
hi,
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).
Can anyone help me in this?
Pooja
--
View this message in context: http://www.nabble.com/Lucene-searching--class-tf4692438.html#a13412082
Sent from the Lucene - Java Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Lucene searching class
Posted by poojasreejith <po...@pivotsys.com>.
Hi Steven,
It really solved my problem. thanks a lot.
pooja
Steven Rowe wrote:
>
> 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: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Lucene-searching--class-tf4692438.html#a13420715
Sent from the Lucene - Java Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Lucene searching class
Posted by Steven Rowe <sa...@syr.edu>.
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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Lucene searching class
Posted by Karl Wettin <ka...@gmail.com>.
25 okt 2007 kl. 19.38 skrev poojasreejith:
>
> hi,
>
> 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).
There is no such method.
<http://lucene.apache.org/java/2_2_0/api/org/apache/lucene/
queryParser/QueryParser.html#parse(java.lang.String)>
--
karl
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org