|
|
|
@ -174,7 +174,6 @@ public class RemoteSearch extends Thread {
|
|
|
|
|
dhtPeers = DHTSelection.selectClusterPeers(event.peers, clusterselection);
|
|
|
|
|
} else {
|
|
|
|
|
if (event.query.getQueryGoal().isCatchall() || event.query.getQueryGoal().getIncludeHashes().has(Segment.catchallHash)) {
|
|
|
|
|
|
|
|
|
|
if (event.query.modifier.sitehost != null && event.query.modifier.sitehost.length() > 0) {
|
|
|
|
|
// select peers according to host name, not the query goal
|
|
|
|
|
String newGoal = Domains.getSmartSLD(event.query.modifier.sitehost);
|
|
|
|
@ -186,10 +185,9 @@ public class RemoteSearch extends Thread {
|
|
|
|
|
random);
|
|
|
|
|
} else {
|
|
|
|
|
// select just random peers
|
|
|
|
|
dhtPeers = DHTSelection.seedsByAge(event.peers, false, count).values();
|
|
|
|
|
}
|
|
|
|
|
dhtPeers = DHTSelection.seedsByAge(event.peers, false, event.peers.redundancy()).values();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
dhtPeers = DHTSelection.selectDHTSearchTargets(
|
|
|
|
|
event.peers,
|
|
|
|
|
event.query.getQueryGoal().getIncludeHashes(),
|
|
|
|
@ -207,6 +205,7 @@ public class RemoteSearch extends Thread {
|
|
|
|
|
for (int i = 0; i < targetSize; i++) dhtPeers.add(pa.remove(random.nextInt(pa.size())));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (dhtPeers == null) dhtPeers = new HashSet<Seed>();
|
|
|
|
|
|
|
|
|
|
// select node targets
|
|
|
|
|