Skip to content

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

last-minute-feature 'newbie-selection' for workshop purpose: for remote search, always select all peers that are less than a day old (should be removed someday in the future if load is too high, which could mean when pph > 100)

orbiter756a27049bd2
diff --git a/source/de/anomic/yacy/yacySearch.java b/source/de/anomic/yacy/yacySearch.java
index a8d17989b..c2c20e949 100644
--- a/source/de/anomic/yacy/yacySearch.java
+++ b/source/de/anomic/yacy/yacySearch.java
@@ -216,14 +216,21 @@ public class yacySearch extends Thread {
}
// put in seeds that are public robinson peers and where the peer tags match with query
+ // or seeds that are newbies to ensure that public demonstrations always work
dhtEnum = yacyCore.seedDB.seedsConnected(true, false, null, (float) 0.50);
while (dhtEnum.hasMoreElements()) {
seed = (yacySeed) dhtEnum.nextElement();
if (seed == null) continue;
- if (!seed.matchPeerTags(wordhashes)) continue;
- serverLog.logInfo("PLASMA", "selectPeers/RWIcount: " + seed.hash + ":" + seed.getName() + ", is specialized peer for " + seed.getPeerTags().toString());
- ranking.addScore(seed.hash, seedcount);
- seeds.put(seed.hash, seed);
+ if (seed.matchPeerTags(wordhashes)) { // access robinson peers with matching tag
+ serverLog.logInfo("PLASMA", "selectPeers/PeerTags: " + seed.hash + ":" + seed.getName() + ", is specialized peer for " + seed.getPeerTags().toString());
+ ranking.addScore(seed.hash, seedcount);
+ seeds.put(seed.hash, seed);
+ }
+ if (seed.getAge() < 1) { // the 'workshop feature'
+ serverLog.logInfo("PLASMA", "selectPeers/Age: " + seed.hash + ":" + seed.getName() + ", is newbie, age = " + seed.getAge());
+ ranking.addScore(seed.hash, seedcount);
+ seeds.put(seed.hash, seed);
+ }
}
// evaluate the ranking score and select seeds