Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
- 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
Michael Peter Christen2d36a7eaf5b0
diff --git a/defaults/yacy.init b/defaults/yacy.initindex 6c4032a01..b97f077e0 100644--- a/defaults/yacy.init+++ b/defaults/yacy.init@@ -742,8 +742,8 @@ search.options = true# search domains. If set to false then that search is not availablesearch.text = truesearch.image = true-search.audio = true-search.video = true+search.audio = false+search.video = falsesearch.app = false# number of search results displayed by defaultdiff --git a/htroot/Network.html b/htroot/Network.htmlindex e1717972b..fb01d43cc 100644--- a/htroot/Network.html+++ b/htroot/Network.html@@ -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>diff --git a/source/net/yacy/peers/Protocol.java b/source/net/yacy/peers/Protocol.javaindex 2261c2b15..4b3f8404f 100644--- a/source/net/yacy/peers/Protocol.java+++ b/source/net/yacy/peers/Protocol.java@@ -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);diff --git a/source/net/yacy/peers/RemoteSearch.java b/source/net/yacy/peers/RemoteSearch.javaindex 9d005d5ef..587cd7c76 100644--- a/source/net/yacy/peers/RemoteSearch.java+++ b/source/net/yacy/peers/RemoteSearch.java@@ -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,diff --git a/source/net/yacy/peers/graphics/Banner.java b/source/net/yacy/peers/graphics/Banner.javaindex 61a9a33cb..ae9f2116e 100644--- a/source/net/yacy/peers/graphics/Banner.java+++ b/source/net/yacy/peers/graphics/Banner.java@@ -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 descriptionbannerPicture.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);diff --git a/source/net/yacy/search/query/SearchEvent.java b/source/net/yacy/search/query/SearchEvent.javaindex cf9b4fe95..1ae94deb4 100644--- a/source/net/yacy/search/query/SearchEvent.java+++ b/source/net/yacy/search/query/SearchEvent.java@@ -259,7 +259,7 @@ public final class SearchEvent {// start a local solr searchif (!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 searchif (!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;}