git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@320 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
orbiter 2005-06-23 14:40:39 +00:00
parent d6c85228a6
commit 56d28a16f0
4 changed files with 11 additions and 3 deletions

View File

@ -146,6 +146,7 @@ public class CacheAdmin_p {
} }
private static String formatHeader(httpHeader header) { private static String formatHeader(httpHeader header) {
if (header == null) return "- no header in header cache -";
String out = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"; String out = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
Iterator it = header.entrySet().iterator(); Iterator it = header.entrySet().iterator();
Map.Entry entry; Map.Entry entry;

View File

@ -153,7 +153,7 @@ public final class plasmaSearch {
singleResult = wordIndex.getEntity(singleHash, true); singleResult = wordIndex.getEntity(singleHash, true);
// check result // check result
if (singleResult.size() == 0) return new plasmaWordIndexEntity(null); // as this is a cunjunction of searches, we have no result if any word is not known if ((singleResult == null) || (singleResult.size() == 0)) return new plasmaWordIndexEntity(null); // as this is a cunjunction of searches, we have no result if any word is not known
// store result in order of result size // store result in order of result size
map.put(serverCodings.enhancedCoder.encodeHex(singleResult.size(), 8) + singleHash, singleResult); map.put(serverCodings.enhancedCoder.encodeHex(singleResult.size(), 8) + singleHash, singleResult);

View File

@ -1199,8 +1199,13 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
log.logInfo("INIT WORD SEARCH: " + gs + " - " + count + " links, " + (time / 1000) + " seconds"); log.logInfo("INIT WORD SEARCH: " + gs + " - " + count + " links, " + (time / 1000) + " seconds");
long timestamp = System.currentTimeMillis(); long timestamp = System.currentTimeMillis();
Thread preselect = new presearch(queryhashes, order, time / 10, urlmask, 5); if (global) {
preselect.start(); // start a presearch, which makes only sense if we idle afterwards.
// this is especially the case if we start a global search and idle until search
// results appear from other peers
Thread preselect = new presearch(queryhashes, order, time / 10, urlmask, 5);
preselect.start();
}
// do global fetching // do global fetching
int globalresults = 0; int globalresults = 0;

View File

@ -324,6 +324,8 @@ public class yacyCore {
log.logInfo("publish: handshaked " + this.seed.get("PeerType", "senior") + " peer '" + this.seed.getName() + "' at " + this.seed.getAddress()); log.logInfo("publish: handshaked " + this.seed.get("PeerType", "senior") + " peer '" + this.seed.getName() + "' at " + this.seed.getAddress());
} }
} catch (Exception e) { } catch (Exception e) {
log.logError("publishThread: error with target seed " + seed.getMap() + ": " + e.getMessage());
e.printStackTrace();
this.error = e; this.error = e;
} finally { } finally {
this.syncList.add(this); this.syncList.add(this);