lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Halsted" <>
Subject Minor issues with sample Web app
Date Sun, 05 Nov 2006 03:09:15 GMT
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:
For additional commands, e-mail:

View raw message