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)

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3712 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 18 years ago
parent c73b7588ed
commit 756a27049b

@ -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

Loading…
Cancel
Save