- do not create a new query for all remote peers

- no document search this time
- adjusted banner and network to not show 'WORDS' but DHT Chunks. This
is to avoid confusion for robinson peers which do not create Word
Entries
pull/1/head
Michael Peter Christen 12 years ago
parent 4af0839be2
commit 2d36a7eaf5

@ -742,8 +742,8 @@ search.options = true
# search domains. If set to false then that search is not available
search.text = true
search.image = true
search.audio = true
search.video = true
search.audio = false
search.video = false
search.app = false
# number of search results displayed by default

@ -120,9 +120,9 @@ To see a list of all APIs, please visit the <a href="http://www.yacy-websuche.de
<td><strong>Links</strong></td>
<td><strong>RWIs</strong></td>
<td><strong>URLs for<br/>Remote<br/>Crawl</strong></td>
<td><strong>Sent<br/>Words</strong></td>
<td><strong>Sent<br/>DHT Word Chunks</strong></td>
<td><strong>Sent<br/>URLs</strong></td>
<td><strong>Received<br/>Words</strong></td>
<td><strong>Received<br/>DHT Word Chunks</strong></td>
<td><strong>Received<br/>URLs</strong></td>
#(complete)#::
<td><strong>Address</strong></td>
@ -247,9 +247,9 @@ To see a list of all APIs, please visit the <a href="http://www.yacy-websuche.de
<td>Links</td>
<td>RWIs</td>
<td>URLs for<br/>Remote Crawl</td>
<td>Sent<br/>Words</td>
<td>Sent<br/>DHT Word Chunks</td>
<td>Sent<br/>URLs</td>
<td>Received<br/>Words</td>
<td>Received<br/>DHT Word Chunks</td>
<td>Received<br/>URLs</td>
<td>Known<br/>Seeds</td>
<td>Connects<br/>per hour</td>

@ -1020,6 +1020,7 @@ public final class Protocol {
protected static int solrQuery(
final SearchEvent event,
final SolrQuery solrQuery,
final int offset,
final int count,
boolean getFacets,
@ -1030,7 +1031,6 @@ public final class Protocol {
return -1; // we cannot query solr only with word hashes, there is no clear text string
}
event.addExpectedRemoteReferences(count);
final SolrQuery solrQuery = event.query.solrQuery();
solrQuery.setStart(offset);
solrQuery.setRows(count);

@ -30,6 +30,8 @@ import java.util.List;
import java.util.Set;
import java.util.SortedMap;
import org.apache.solr.client.solrj.SolrQuery;
import net.yacy.cora.document.ASCII;
import net.yacy.cora.storage.HandleSet;
import net.yacy.kelondro.logging.Log;
@ -171,8 +173,9 @@ public class RemoteSearch extends Thread {
nodePeers.add(event.peers.mySeed());
}
if (!Switchboard.getSwitchboard().getConfigBool(SwitchboardConstants.DEBUG_SEARCH_REMOTE_SOLR_OFF, false)) {
final SolrQuery solrQuery = event.query.solrQuery();
for (Seed s: nodePeers) {
solrRemoteSearch(event, start, count, s, blacklist);
solrRemoteSearch(event, solrQuery, start, count, s, blacklist);
}
}
@ -264,6 +267,7 @@ public class RemoteSearch extends Thread {
public static Thread solrRemoteSearch(
final SearchEvent event,
final SolrQuery solrQuery,
final int start,
final int count,
final Seed targetPeer,
@ -281,6 +285,7 @@ public class RemoteSearch extends Thread {
event.oneFeederStarted();
urls = Protocol.solrQuery(
event,
solrQuery,
start,
count,
start == 0,

@ -66,7 +66,7 @@ public final class Banner {
private static void drawBannerPicture(
final BannerData data, final BufferedImage newLogo) {
final int exprlength = 19;
final int exprlength = 16;
logo = newLogo;
bannerPicture =
new RasterPlotter(
@ -80,17 +80,17 @@ public final class Banner {
// draw description
bannerPicture.setColor(Long.parseLong(data.getTextcolor(), 16));
PrintTool.print(bannerPicture, 100, 12, 0, "PEER: " + addTrailingBlanks(data.getName(), exprlength), -1);
PrintTool.print(bannerPicture, 100, 22, 0, "LINKS: " + addBlanksAndDots(data.getLinks(), exprlength), -1);
PrintTool.print(bannerPicture, 100, 32, 0, "WORDS: " + addBlanksAndDots(data.getWords(), exprlength), -1);
PrintTool.print(bannerPicture, 100, 42, 0, "TYPE: " + addTrailingBlanks(data.getType(), exprlength), -1);
PrintTool.print(bannerPicture, 100, 52, 0, "SPEED: " + addTrailingBlanks(data.getPpm() + " PAGES/MINUTE", exprlength), -1);
PrintTool.print(bannerPicture, 285, 12, 0, "NETWORK: " + addTrailingBlanks(data.getNetwork() + " [" + data.getPeers() + "]", exprlength), -1);
PrintTool.print(bannerPicture, 285, 22, 0, "LINKS: " + addBlanksAndDots(data.getNlinks(), exprlength), -1);
PrintTool.print(bannerPicture, 285, 32, 0, "WORDS: " + addBlanksAndDots(data.getNwords(), exprlength), -1);
PrintTool.print(bannerPicture, 285, 42, 0, "QUERIES: " + addTrailingBlanks(formatQpm(data.getNqph()) + " QUERIES/HOUR", exprlength), -1);
PrintTool.print(bannerPicture, 285, 52, 0, "SPEED: " + addTrailingBlanks(data.getNppm() + " PAGES/MINUTE", exprlength), -1);
PrintTool.print(bannerPicture, 100, 12, 0, "PEER NAME:" + addTrailingBlanks(data.getName(), exprlength), -1);
PrintTool.print(bannerPicture, 100, 22, 0, "DOCUMENTS:" + addBlanksAndDots(data.getLinks(), exprlength), -1);
PrintTool.print(bannerPicture, 100, 32, 0, "DHT WORDS:" + addBlanksAndDots(data.getWords(), exprlength), -1);
PrintTool.print(bannerPicture, 100, 42, 0, "TYPE: " + addTrailingBlanks(data.getType(), exprlength), -1);
PrintTool.print(bannerPicture, 100, 52, 0, "SPEED: " + addTrailingBlanks(data.getPpm() + " PAGES/MINUTE", exprlength), -1);
PrintTool.print(bannerPicture, 290, 12, 0, "NETWORK: " + addTrailingBlanks(data.getNetwork() + " [" + data.getPeers() + "]", exprlength), -1);
PrintTool.print(bannerPicture, 290, 22, 0, "LINKS: " + addBlanksAndDots(data.getNlinks(), exprlength), -1);
PrintTool.print(bannerPicture, 290, 32, 0, "WORDS: " + addBlanksAndDots(data.getNwords(), exprlength), -1);
PrintTool.print(bannerPicture, 290, 42, 0, "QUERIES: " + addTrailingBlanks(formatQpm(data.getNqph()) + " QUERIES/HOUR", exprlength), -1);
PrintTool.print(bannerPicture, 290, 52, 0, "SPEED: " + addTrailingBlanks(data.getNppm() + " PAGES/MINUTE", exprlength), -1);
if (logo != null) {
final int x = (100 / 2 - logo.getWidth() / 2);

@ -259,7 +259,7 @@ public final class SearchEvent {
// start a local solr search
if (!Switchboard.getSwitchboard().getConfigBool(SwitchboardConstants.DEBUG_SEARCH_LOCAL_SOLR_OFF, false)) {
this.localsolrsearch = RemoteSearch.solrRemoteSearch(this, 0, this.query.itemsPerPage, null /*this peer*/, Switchboard.urlBlacklist);
this.localsolrsearch = RemoteSearch.solrRemoteSearch(this, this.query.solrQuery(), 0, this.query.itemsPerPage, null /*this peer*/, Switchboard.urlBlacklist);
}
this.localsolroffset = this.query.itemsPerPage;
@ -1291,7 +1291,7 @@ public final class SearchEvent {
int nextitems = item - this.localsolroffset + this.query.itemsPerPage; // example: suddenly switch to item 60, just 10 had been shown, 20 loaded.
if (this.localsolrsearch != null && this.localsolrsearch.isAlive()) {try {this.localsolrsearch.join();} catch (InterruptedException e) {}}
if (!Switchboard.getSwitchboard().getConfigBool(SwitchboardConstants.DEBUG_SEARCH_LOCAL_SOLR_OFF, false)) {
this.localsolrsearch = RemoteSearch.solrRemoteSearch(this, this.localsolroffset, nextitems, null /*this peer*/, Switchboard.urlBlacklist);
this.localsolrsearch = RemoteSearch.solrRemoteSearch(this, this.query.solrQuery(), this.localsolroffset, nextitems, null /*this peer*/, Switchboard.urlBlacklist);
}
this.localsolroffset += nextitems;
}
@ -1312,7 +1312,7 @@ public final class SearchEvent {
if (this.localsolrsearch == null || !this.localsolrsearch.isAlive() && this.local_solr_stored.get() > this.localsolroffset && (item + 1) % this.query.itemsPerPage == 0) {
// at the end of a list, trigger a next solr search
if (!Switchboard.getSwitchboard().getConfigBool(SwitchboardConstants.DEBUG_SEARCH_LOCAL_SOLR_OFF, false)) {
this.localsolrsearch = RemoteSearch.solrRemoteSearch(this, this.localsolroffset, this.query.itemsPerPage, null /*this peer*/, Switchboard.urlBlacklist);
this.localsolrsearch = RemoteSearch.solrRemoteSearch(this, this.query.solrQuery(), this.localsolroffset, this.query.itemsPerPage, null /*this peer*/, Switchboard.urlBlacklist);
}
this.localsolroffset += this.query.itemsPerPage;
}

Loading…
Cancel
Save