Thanks for making this change!
A few comments:
[EMAIL PROTECTED] wrote:
==============================================================================
---
lucene/nutch/trunk/src/java/org/apache/nutch/searcher/OpenSearchServlet.java
(original)
+++
lucene/nutch/trunk/src/java/org/apache/nutch/searcher/OpenSearchServlet.java
Tue May 9 16:04:40 2006
[...]
- addNode(doc, item, "description", summaries[i]);
+ addNode(doc, item, "description", summaries[i].toString());
This means there's no markup in the OpenSearch output?
Shouldn't there be?
Modified: lucene/nutch/trunk/src/web/jsp/search.jsp
URL:
http://svn.apache.org/viewcvs/lucene/nutch/trunk/src/web/jsp/search.jsp?rev=405565&r1=405564&r2=405565&view=diff
==============================================================================
+
+ // Build the summary
+ StringBuffer sum = new StringBuffer();
+ Fragment[] fragments = summaries[i].getFragments();
+ for (int j=0; j<fragments.length; j++) {
+ if (fragments[j].isHighlight()) {
+ sum.append("<span class=\"highlight\">")
+ .append(Entities.encode(fragments[j].getText()))
+ .append("</span>");
+ } else if (fragments[j].isEllipsis()) {
+ sum.append("<span class=\"ellipsis\"> ... </span>");
+ } else {
+ sum.append(Entities.encode(fragments[j].getText()));
+ }
+ }
+ String summary = sum.toString();
Perhaps this should be a method on Summary, to render it as html?
Doug
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Nutch-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nutch-developers