Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
bugfixes
orbitere89ded9e4104
diff --git a/build.properties b/build.propertiesindex c7e5bca4a..9f5fcbc67 100644--- a/build.properties+++ b/build.properties@@ -3,9 +3,9 @@ javacSource=1.4javacTarget=1.4# Release Configuration-releaseVersion=0.375+releaseVersion=0.376releaseFile=yacy_dev_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz-releaseDir=yacy_v${releaseVersion}_${DSTAMP}_${releaseNr}+releaseDir=yacy_dev_v${releaseVersion}_${DSTAMP}_${releaseNr}releaseNr=$Revision$# defining some file/directory access rightsdiff --git a/htroot/Network.java b/htroot/Network.javaindex 7edddb26b..47a340ed3 100644--- a/htroot/Network.java+++ b/htroot/Network.java@@ -167,9 +167,18 @@ public class Network {boolean complete = post.containsKey("ip");Enumeration e = null;switch (page) {- case 1 : e = yacyCore.seedDB.seedsSortedConnected(post.get("order", "down").equals("up"), post.get("sort", "LCount")); break;- case 2 : e = yacyCore.seedDB.seedsSortedDisconnected(post.get("order", "up").equals("up"), post.get("sort", "LastSeen")); break;- case 3 : e = yacyCore.seedDB.seedsSortedPotential(post.get("order", "up").equals("up"), post.get("sort", "LastSeen")); break;+ case 1 :+ e = yacyCore.seedDB.seedsSortedConnected(post.get("order", "down").equals("up"), post.get("sort", "LCount"));+ prop.put("table_total", yacyCore.seedDB.sizeConnected());+ break;+ case 2 :+ e = yacyCore.seedDB.seedsSortedDisconnected(post.get("order", "up").equals("up"), post.get("sort", "LastSeen"));+ prop.put("table_total", yacyCore.seedDB.sizeDisconnected());+ break;+ case 3 :+ e = yacyCore.seedDB.seedsSortedPotential(post.get("order", "up").equals("up"), post.get("sort", "LastSeen"));+ prop.put("table_total", yacyCore.seedDB.sizePotential());+ break;}while ((e.hasMoreElements()) && (conCount < maxCount)) {seed = (yacySeed) e.nextElement();@@ -228,7 +237,7 @@ public class Network {prop.put("table_list", conCount);prop.put("table", 1);prop.put("table_num", conCount);- prop.put("table_total", (maxCount > conCount) ? conCount : maxCount);+ //prop.put("table_total", (maxCount > conCount) ? conCount : maxCount);prop.put("table_complete", ((complete)? 1 : 0) );}}diff --git a/htroot/index.java b/htroot/index.javaindex 79818d952..8be4b9fb3 100644--- a/htroot/index.java+++ b/htroot/index.java@@ -114,7 +114,7 @@ public class index {// process search wordsString querystring = (String) post.get("search", "");- try { sb.facilityDB.update("zeitgeist", querystring, post); } catch (IOException e) {}+ try { sb.facilityDB.update("zeitgeist", querystring, post); } catch (Exception e) {}TreeSet query = cleanQuery(querystring);// filter out stopwordsTreeSet filtered = kelondroMSetTools.joinConstructive(query, plasmaSwitchboard.stopwords);diff --git a/htroot/yacy/crawlReceipt.java b/htroot/yacy/crawlReceipt.javaindex 064d85b97..bbfe013ed 100644--- a/htroot/yacy/crawlReceipt.java+++ b/htroot/yacy/crawlReceipt.java@@ -45,6 +45,7 @@import de.anomic.http.httpHeader;import de.anomic.plasma.plasmaCrawlNURL;+import de.anomic.plasma.plasmaCrawlLURL;import de.anomic.plasma.plasmaSwitchboard;import de.anomic.plasma.plasmaURL;import de.anomic.server.serverObjects;@@ -113,6 +114,14 @@ public class crawlReceipt {switchboard.loadedURL.newEntry(propStr, true, youare, iam, 1);switchboard.noticeURL.remove(urlhash);+ // write log+ plasmaCrawlLURL.entry entry = switchboard.loadedURL.getEntry(urlhash);+ if (entry == null) {+ switchboard.getLog().logError("RECEIVED wrong RECEIPT for hash " + urlhash + " from peer " + iam);+ } else {+ switchboard.getLog().logInfo("RECEIVED RECEIPT for url " + entry.url().toString());+ }+// ready for moreprop.put("delay", "10");} else {diff --git a/source/de/anomic/kelondro/kelondroMap.java b/source/de/anomic/kelondro/kelondroMap.javaindex 437ff1b6f..688994c8b 100644--- a/source/de/anomic/kelondro/kelondroMap.java+++ b/source/de/anomic/kelondro/kelondroMap.java@@ -125,7 +125,10 @@ public class kelondroMap {if (accfields != null) for (int i = 0; i < accfields.length; i++) accMap.put(accfields[i], accumulator[i]);}-+ public int keySize() {+ return dyn.columnSize(0);+ }+public synchronized void set(String key, Map newMap) throws IOException {// update elementCountif ((sortfields != null) || (accfields != null)) {diff --git a/source/de/anomic/kelondro/kelondroTables.java b/source/de/anomic/kelondro/kelondroTables.javaindex 453285716..c9f3b4432 100644--- a/source/de/anomic/kelondro/kelondroTables.java+++ b/source/de/anomic/kelondro/kelondroTables.java@@ -101,6 +101,7 @@ public class kelondroTables {public synchronized void update(String tablename, String key, Map map) throws IOException {kelondroMap table = (kelondroMap) mTables.get(tablename);if (table == null) throw new RuntimeException("kelondroTables.update: map table '" + tablename + "' does not exist.");+ if (key.length() > table.keySize()) key = key.substring(0, table.keySize());table.set(key, map);mTables.put(tablename, table);}@@ -122,6 +123,7 @@ public class kelondroTables {public synchronized Map selectMap(String tablename, String key) throws IOException {kelondroMap table = (kelondroMap) mTables.get(tablename);if (table == null) throw new RuntimeException("kelondroTables.selectMap: map table '" + tablename + "' does not exist.");+ if (key.length() > table.keySize()) key = key.substring(0, table.keySize());return table.get(key);}@@ -171,6 +173,7 @@ public class kelondroTables {public synchronized void delete(String tablename, String key) throws IOException {kelondroMap table = (kelondroMap) mTables.get(tablename);+ if (key.length() > table.keySize()) key = key.substring(0, table.keySize());if (table != null) {table.remove(key); mTables.put(tablename, table); return;}kelondroTree Tree = (kelondroTree) tTables.get(tablename);diff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.javaindex b932a16e7..5f8e181f0 100644--- a/source/de/anomic/plasma/plasmaSwitchboard.java+++ b/source/de/anomic/plasma/plasmaSwitchboard.java@@ -645,7 +645,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser}processLocalCrawling(urlEntry, profile);- return false;+ return true;}public int remoteTriggeredCrawlJobSize() {@@ -969,7 +969,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements serif (u == null) return plasmaURL.dummyHash; else return u.toString();}-+ /*private void processCrawlingX(plasmaCrawlNURL.entry urlEntry, String initiator) {if (urlEntry.url() == null) return;String profileHandle = urlEntry.profileHandle();@@ -984,11 +984,11 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser", permission=" + ((yacyCore.seedDB == null) ? "undefined" : (((yacyCore.seedDB.mySeed.isSenior()) || (yacyCore.seedDB.mySeed.isPrincipal())) ? "true" : "false")));boolean tryRemote =- (profile.remoteIndexing()) /* granted */ &&- (urlEntry.depth() == profile.generalDepth()) /* leaf node */ &&- (urlEntry.initiator() != null) && (!(urlEntry.initiator().equals(plasmaURL.dummyHash))) /* not proxy */ &&+ (profile.remoteIndexing()) &&+ (urlEntry.depth() == profile.generalDepth()) &&+ (urlEntry.initiator() != null) && (!(urlEntry.initiator().equals(plasmaURL.dummyHash))) &&((yacyCore.seedDB.mySeed.isSenior()) ||- (yacyCore.seedDB.mySeed.isPrincipal())) /* qualified */;+ (yacyCore.seedDB.mySeed.isPrincipal())) ;if (tryRemote) {boolean success = processRemoteCrawlTrigger(urlEntry);@@ -997,16 +997,16 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements serprocessLocalCrawling(urlEntry, profile);}}-+ */private boolean processLocalCrawling(plasmaCrawlNURL.entry urlEntry, plasmaCrawlProfile.entry profile) {// work off one Crawl stack entryif ((urlEntry == null) && (urlEntry.url() == null)) {- log.logInfo("LOCALCRAWL[" + noticeURL.coreStackSize() + ", " + noticeURL.remoteStackSize() + "]: urlEntry=null");+ log.logInfo("LOCALCRAWL[" + noticeURL.coreStackSize() + ", " + noticeURL.limitStackSize() + ", " + noticeURL.overhangStackSize() + ", " + noticeURL.remoteStackSize() + "]: urlEntry=null");return false;}cacheLoader.loadParallel(urlEntry.url(), urlEntry.referrerHash(), urlEntry.initiator(), urlEntry.depth(), profile);- log.logInfo("LOCALCRAWL[" + noticeURL.coreStackSize() + ", " + noticeURL.remoteStackSize() + "]: enqueued for load " + urlEntry.url());+ log.logInfo("LOCALCRAWL[" + noticeURL.coreStackSize() + ", " + noticeURL.limitStackSize() + ", " + noticeURL.overhangStackSize() + ", " + noticeURL.remoteStackSize() + "]: enqueued for load " + urlEntry.url());return true;}