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 David Halsted <da...@gmail.com> on 2006/11/05 04:09:15 UTC

Minor issues with sample Web app

I ran into a couple of minor issues with the sample Web app included
in the Lucene 2.0.0 download in results.jsp.  Not sure whether this
list is the right place to bring this up but thought I'd try.

*) At line 81, there's a line that assumes a static
parse(String,String,Analyzer) in QueryParser, and there isn't one in
this version, so I was throwing a Jasper error.  It's easy to fix but
it might confuse some folks:

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

*) org.apache.lucene.demo.IndexHTML calls HTMLDocument, which creates
a field called "path" and fills it with the URL of the file.
results.jsp has the following around line 130:

String url = doc.get("url");

Of course, that returns null (the field is called "path", not "url"),
so the result sets you get back look really broken (none of the links
to the docuements work).  This works:

String url = doc.get("path");

So, not a big deal, but might be nice to fix sometime.

Dave Halsted

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org