Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
fix for host navigator
Michael Peter Christen2ea585d616bf
diff --git a/source/net/yacy/kelondro/data/meta/URIMetadataRow.java b/source/net/yacy/kelondro/data/meta/URIMetadataRow.javaindex 756586c52..be805dbeb 100644--- a/source/net/yacy/kelondro/data/meta/URIMetadataRow.java+++ b/source/net/yacy/kelondro/data/meta/URIMetadataRow.java@@ -376,6 +376,13 @@ public class URIMetadataRow implements URIMetadata {return this.entry.getPrimaryKeyBytes();}+ private String hostHash = null;+ public String hosthash() {+ if (this.hostHash != null) return this.hostHash;+ this.hostHash = ASCII.String(this.entry.getPrimaryKeyBytes(), 6, 6);+ return this.hostHash;+ }+public long ranking() {return this.ranking;}diff --git a/source/net/yacy/search/query/RWIProcess.java b/source/net/yacy/search/query/RWIProcess.javaindex 9d5963f9a..104cacca1 100644--- a/source/net/yacy/search/query/RWIProcess.java+++ b/source/net/yacy/search/query/RWIProcess.java@@ -307,15 +307,6 @@ public final class RWIProcess extends Thread}}- // check tld domain- /*- if ((DigestURI.domDomain(iEntry.metadataHash()) & this.query.zonecode) == 0) {- // filter out all tld that do not match with wanted tld domain- this.sortout++;- continue;- }- */-// count domZones//this.domZones[DigestURI.domDomain(iEntry.metadataHash())]++;@@ -331,8 +322,9 @@ public final class RWIProcess extends Threadcontinue pollloop;}}+// collect host navigation information (even if we have only one; this is to provide a switch-off button)- if ( nav_hosts || this.query.urlMask_isCatchall ) {+ if (this.query.navigators.isEmpty() && (nav_hosts || this.query.urlMask_isCatchall)) {this.hostNavigator.inc(hosthash);this.hostResolver.put(hosthash, iEntry.urlhash());}@@ -675,6 +667,15 @@ public final class RWIProcess extends Threadcontinue;}+ // from here: collect navigation information++ // collect host navigation information (even if we have only one; this is to provide a switch-off button)+ if (!this.query.navigators.isEmpty() && (this.query.urlMask_isCatchall || this.query.navigators.equals("all") || this.query.navigators.indexOf("hosts", 0) >= 0)) {+ final String hosthash = page.hosthash();+ this.hostNavigator.inc(hosthash);+ this.hostResolver.put(hosthash, page.hash());+ }+// namespace navigationString pagepath = page.url().getPath();if ( (p = pagepath.indexOf(':')) >= 0 ) {