Hi,

Replace the line

query = QueryParser.parse(queryString, "contents", analyzer);

in
lucene/src/jsp/results.jsp

with

  QueryParser qp = new QueryParser("contents", analyzer);
                 query = qp.parse(queryString);


Something changed in the QP api - this reflects the new call. I'm not sure if its the only change that needs to be made, but it now all works for me.

Winton


Thanks Erik, I'm trying to run the example given along with Lucene 2.0,
but its giving error.
I tried debuging it, but unnable to find the solution.

The error message it gives is as follows..

Error compiling file:
D:\projects\server\web\tomcat\work\_\localhost\rChive\Lucene\/results_js
p.j-ava
    [javac] Compiling 1 source file

D:\projects\server\web\tomcat\work\_\localhost\rChive\Lucene\results_jsp
.ja-va:167:
parse(java.lang.String) in org.apache.lucene.queryParser.QueryParser
cannot be applied to
(java.lang.String,java.lang.String,org.apache.lucene.analysis.Analyzer)
                        query = QueryParser.parse(queryString,
"contents", analyzer);
                                           ^
Note:
D:\projects\server\web\tomcat\work\_\localhost\rChive\Lucene\results_jsp
.ja-va
uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note:
D:\projects\server\web\tomcat\work\_\localhost\rChive\Lucene\results_jsp
.ja-va
uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error


Here, point to be noted is that, the method "parse" in QueryParser.java
is not static and also its signature is "parse(String query)" and not
"parse(queryString, "contents", analyzer)".

I'm not getting what's happening. Need your help.

Regards
Sam



-----Original Message-----
From: Erik Hatcher [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 04, 2006 5:29 PM
To: java-user@lucene.apache.org
Subject: Re: Apache Lucene Search Engine

On Jul 4, 2006, at 2:27 AM, Sarvadnya Mutalik wrote:
 Hi all, I need information about which version of Apache Lucene search

 engine you recommend, which is stable and recomended for production or

 mission-critical systems.

Lucene 2.0 is the latest release version.  That is the recommended
starting point today.

        Erik


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


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


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

Reply via email to