Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

added option to see ranking scores in surftipps and some cleanups

orbiter310f1c41cd8c
diff --git a/htroot/Surftipps.java b/htroot/Surftipps.java
index 4418e6d37..3a33a9061 100644
--- a/htroot/Surftipps.java
+++ b/htroot/Surftipps.java
@@ -54,6 +54,8 @@ public class Surftipps {
int display = ((post == null) || (!authenticated)) ? 0 : post.getInt("display", 0);
prop.put("display", display);
+ boolean showScore = ((post != null) && (post.containsKey("score")));
+
boolean surftippsOn = sb.getConfigBool("showSurftipps", true);
if ((post != null) && (post.containsKey("surftipps"))) {
if (!sb.verifyAuthentication(header, false)) {
@@ -134,12 +136,12 @@ public class Surftipps {
e.printStackTrace();
}
prop.put("surftipps_results_" + i + "_recommend", (voted) ? 0 : 1);
- prop.put("surftipps_results_" + i + "_recommend_negativeVoteLink", "/Surftipps.html?voteNegative=" + urlhash + "&refid=" + refid + "&display=" + display); // for negaive votes, we don't send around the bad url again, the hash is enough
- prop.put("surftipps_results_" + i + "_recommend_positiveVoteLink", "/Surftipps.html?votePositive=" + urlhash + "&refid=" + refid + "&url=" + crypt.simpleEncode(url,null,'b') + "&title=" + crypt.simpleEncode(title,null,'b') + "&description=" + crypt.simpleEncode(description,null,'b') + "&display=" + display);
+ prop.put("surftipps_results_" + i + "_recommend_negativeVoteLink", "/Surftipps.html?voteNegative=" + urlhash + "&refid=" + refid + "&display=" + display + ((showScore) ? "&score=" : "")); // for negaive votes, we don't send around the bad url again, the hash is enough
+ prop.put("surftipps_results_" + i + "_recommend_positiveVoteLink", "/Surftipps.html?votePositive=" + urlhash + "&refid=" + refid + "&url=" + crypt.simpleEncode(url,null,'b') + "&title=" + crypt.simpleEncode(title,null,'b') + "&description=" + crypt.simpleEncode(description,null,'b') + "&display=" + display + ((showScore) ? "&score=" : ""));
prop.put("surftipps_results_" + i + "_url", url);
prop.put("surftipps_results_" + i + "_urlname", nxTools.shortenURLString(url, 60));
prop.put("surftipps_results_" + i + "_urlhash", urlhash);
- prop.put("surftipps_results_" + i + "_title", title);
+ prop.put("surftipps_results_" + i + "_title", (showScore) ? ("(" + ranking.getScore(urlhash) + ") " + title) : title);
prop.put("surftipps_results_" + i + "_description", description);
i++;
diff --git a/source/de/anomic/http/httpdLimitExceededException.java b/source/de/anomic/http/httpdLimitExceededException.java
index 8e35faccd..758bf9cff 100644
--- a/source/de/anomic/http/httpdLimitExceededException.java
+++ b/source/de/anomic/http/httpdLimitExceededException.java
@@ -47,6 +47,7 @@ import java.io.IOException;
public class httpdLimitExceededException extends IOException {
+ private static final long serialVersionUID = 1L;
private long limit;
public httpdLimitExceededException(String errorMsg, long limit) {
diff --git a/source/de/anomic/index/indexEntryAttribute.java b/source/de/anomic/index/indexEntryAttribute.java
index 0a04a8bf7..229fc0ca4 100644
--- a/source/de/anomic/index/indexEntryAttribute.java
+++ b/source/de/anomic/index/indexEntryAttribute.java
@@ -93,7 +93,7 @@ public class indexEntryAttribute {
public static char docType(URL url) {
String path = url.getPath();
// serverLog.logFinest("PLASMA", "docType URL=" + path);
- char doctype = doctype = indexEntryAttribute.DT_UNKNOWN;
+ char doctype = indexEntryAttribute.DT_UNKNOWN;
if (path.endsWith(".gif")) { doctype = indexEntryAttribute.DT_IMAGE; }
else if (path.endsWith(".jpg")) { doctype = indexEntryAttribute.DT_IMAGE; }
else if (path.endsWith(".jpeg")) { doctype = indexEntryAttribute.DT_IMAGE; }
diff --git a/source/de/anomic/plasma/crawler/plasmaCrawlerException.java b/source/de/anomic/plasma/crawler/plasmaCrawlerException.java
index 165dd4e78..4cd925d4f 100644
--- a/source/de/anomic/plasma/crawler/plasmaCrawlerException.java
+++ b/source/de/anomic/plasma/crawler/plasmaCrawlerException.java
@@ -3,6 +3,9 @@ package de.anomic.plasma.crawler;
import java.io.IOException;
public class plasmaCrawlerException extends IOException {
+
+ private static final long serialVersionUID = 1L;
+
public plasmaCrawlerException(String errorMsg) {
super(errorMsg);
}
diff --git a/source/de/anomic/plasma/plasmaCrawlStacker.java b/source/de/anomic/plasma/plasmaCrawlStacker.java
index c3828b16d..b61e6eb09 100644
--- a/source/de/anomic/plasma/plasmaCrawlStacker.java
+++ b/source/de/anomic/plasma/plasmaCrawlStacker.java
@@ -225,7 +225,7 @@ public final class plasmaCrawlStacker {
plasmaCrawlProfile.entry profile = this.sb.profiles.getEntry(theMsg.profileHandle());
if (profile == null) {
- String errorMsg = "LOST PROFILE HANDLE '" + theMsg.profileHandle() + "' (must be internal error) for URL " + theMsg.url();
+ String errorMsg = "LOST PROFILE HANDLE '" + theMsg.profileHandle() + "' for URL " + theMsg.url();
this.log.logSevere(errorMsg);
throw new IllegalStateException(errorMsg);
}
diff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.java
index 36a46567e..798e5e8fd 100644
--- a/source/de/anomic/plasma/plasmaSwitchboard.java
+++ b/source/de/anomic/plasma/plasmaSwitchboard.java
@@ -103,7 +103,6 @@
package de.anomic.plasma;
-import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.Constructor;
@@ -1227,12 +1226,12 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
// System.out.println("DEBUG plasmaSwitchboard.processCrawling:
// profileHandle = " + profileHandle + ", urlEntry.url = " + urlEntry.url());
if (profileHandle == null) {
- log.logSevere(stats + ": NULL PROFILE HANDLE '" + urlEntry.profileHandle() + "' (must be internal error) for URL " + urlEntry.url());
+ log.logSevere(stats + ": NULL PROFILE HANDLE '" + urlEntry.profileHandle() + "' for URL " + urlEntry.url());
return true;
}
plasmaCrawlProfile.entry profile = profiles.getEntry(profileHandle);
if (profile == null) {
- log.logSevere(stats + ": LOST PROFILE HANDLE '" + urlEntry.profileHandle() + "' (must be internal error) for URL " + urlEntry.url());
+ log.logSevere(stats + ": LOST PROFILE HANDLE '" + urlEntry.profileHandle() + "' for URL " + urlEntry.url());
return true;
}
log.logFine("LOCALCRAWL: URL=" + urlEntry.url() + ", initiator=" + urlEntry.initiator() + ", crawlOrder=" + ((profile.remoteIndexing()) ? "true" : "false") + ", depth=" + urlEntry.depth() + ", crawlDepth=" + profile.generalDepth() + ", filter=" + profile.generalFilter()
@@ -1293,7 +1292,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
// profileHandle = " + profileHandle + ", urlEntry.url = " + urlEntry.url());
plasmaCrawlProfile.entry profile = profiles.getEntry(profileHandle);
if (profile == null) {
- log.logSevere(stats + ": LOST PROFILE HANDLE '" + urlEntry.profileHandle() + "' (must be internal error) for URL " + urlEntry.url());
+ log.logSevere(stats + ": LOST PROFILE HANDLE '" + urlEntry.profileHandle() + "' for URL " + urlEntry.url());
return true;
}
log.logFine("plasmaSwitchboard.limitCrawlTriggerJob: url=" + urlEntry.url() + ", initiator=" + urlEntry.initiator() + ", crawlOrder=" + ((profile.remoteIndexing()) ? "true" : "false") + ", depth=" + urlEntry.depth() + ", crawlDepth=" + profile.generalDepth() + ", filter="
@@ -1381,7 +1380,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
plasmaCrawlProfile.entry profile = profiles.getEntry(profileHandle);
if (profile == null) {
- log.logSevere(stats + ": LOST PROFILE HANDLE '" + urlEntry.profileHandle() + "' (must be internal error) for URL " + urlEntry.url());
+ log.logSevere(stats + ": LOST PROFILE HANDLE '" + urlEntry.profileHandle() + "' for URL " + urlEntry.url());
return false;
}
log.logFine("plasmaSwitchboard.remoteTriggeredCrawlJob: url=" + urlEntry.url() + ", initiator=" + urlEntry.initiator() + ", crawlOrder=" + ((profile.remoteIndexing()) ? "true" : "false") + ", depth=" + urlEntry.depth() + ", crawlDepth=" + profile.generalDepth() + ", filter="
diff --git a/source/de/anomic/soap/SoapException.java b/source/de/anomic/soap/SoapException.java
index 7515d9e38..c7e5d84fa 100644
--- a/source/de/anomic/soap/SoapException.java
+++ b/source/de/anomic/soap/SoapException.java
@@ -50,6 +50,8 @@ import org.apache.axis.Message;
import de.anomic.http.httpHeader;
public class SoapException extends Exception {
+
+ private static final long serialVersionUID = 1L;
private int statusCode = 500;
private String statusText = (String) httpHeader.http1_1.get(Integer.toString(this.statusCode));
private Object errorMsg = this.statusText;