A patch to make sure an exception'ed cluster wouldn't cause hit page
display to suffocate. Will commit soon if no objection.
Dawid: clusterHits() throws exception
"Unidentified problems with the clustering.",
if docs contain long line of hyphens (or just long line of any character?).
I have one setup with many excel files. Their parsed texts (using xlhtml)
are ascii formated using dashes as rectangular boxes.
It will be nice if clusterHits() can handle them gracefully.
Of couse, I can add one more filter to strip them off. But that's ugly.
John
--- src/web/jsp/cluster.jsp.ori 2004-08-09 16:23:53.000000000 -0700
+++ src/web/jsp/cluster.jsp 2004-10-06 12:55:54.000000000 -0700
@@ -22,15 +22,21 @@
HitsCluster [] clusters = null;
if (clusterer != null) {
long clusteringStart = System.currentTimeMillis();
- clusters = clusterer.clusterHits( details, summaries );
+ try {
+ clusters = clusterer.clusterHits( details, summaries );
long clusteringDuration = start - System.currentTimeMillis();
bean.LOG.info("Clustering took: " + clusteringDuration + " milliseconds.");
+ } catch (Exception e) {
+ // failed to do clustering (see below)
+ }
}
if (clusterer == null) {
%>No clustering extension found.<%
} else {
- if (clusters == null || (clusters.length == 0)) {
+ if (clusters == null) {
+ %>Unable to do clustering.<%
+ } else if (clusters.length == 0) {
%>No clusters found.<%
} else {
// display top N clusters and top Q documents inside them.
__________________________________________
http://www.neasys.com - A Good Place to Be
Come to visit us today!
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Nutch-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nutch-developers