From 756a27049bd2e502ec77c76fb08c26887b86a1d6 Mon Sep 17 00:00:00 2001 From: orbiter Date: Fri, 11 May 2007 19:55:19 +0000 Subject: [PATCH] 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 --- source/de/anomic/yacy/yacySearch.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) 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