Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

- fixes for host navigation - fixes for filetype navigation - removed unused code

Michael Peter Christen9319b90d8a54
diff --git a/htroot/yacy/search.html b/htroot/yacy/search.html
index 7e18b99a5..334a6dc05 100644
--- a/htroot/yacy/search.html
+++ b/htroot/yacy/search.html
@@ -1,8 +1,5 @@
version=#[version]#
uptime=#[uptime]#
-fwhop=#[fwhop]#
-fwsrc=#[fwsrc]#
-fwrec=#[fwrec]#
searchtime=#[searchtime]#
references=#[references]#
joincount=#[joincount]#
diff --git a/htroot/yacy/search.java b/htroot/yacy/search.java
index 5f0b8d625..43cac4571 100644
--- a/htroot/yacy/search.java
+++ b/htroot/yacy/search.java
@@ -96,10 +96,6 @@ public final class search {
prop.put("links", "");
prop.put("indexcount", "");
prop.put("indexabstract", "");
- prop.put("fwhop", ""); // hops (depth) of forwards that had been performed to construct this result
- prop.put("fwsrc", ""); // peers that helped to construct this result
- prop.put("fwrec", ""); // peers that would have helped to construct this result (recommendations)
-
if (post == null || env == null) return prop;
if (!Protocol.authentifyRequest(post, env)) return prop;
diff --git a/htroot/yacysearch.java b/htroot/yacysearch.java
index 972d2f884..d8a1ce5b3 100644
--- a/htroot/yacysearch.java
+++ b/htroot/yacysearch.java
@@ -445,9 +445,9 @@ public class yacysearch {
}
if ( !ft.isEmpty() ) {
if ( urlmask == null ) {
- urlmask = ".*\\." + ft;
+ urlmask = ".*\\." + ft + "(\\?.*)?";
} else {
- urlmask = urlmask + ".*\\." + ft;
+ urlmask = urlmask + ".*\\." + ft + "(\\?.*)?";
}
}
modifier.append("filetype:").append(ft).append(' ');
diff --git a/source/net/yacy/peers/Protocol.java b/source/net/yacy/peers/Protocol.java
index 4fe442a91..611ec37ca 100644
--- a/source/net/yacy/peers/Protocol.java
+++ b/source/net/yacy/peers/Protocol.java
@@ -878,11 +878,6 @@ public final class Protocol
}
private static class SearchResult {
- public String version; // version : application version of responder
- public String uptime; // uptime : uptime in seconds of responder
- public String fwhop; // hops (depth) of forwards that had been performed to construct this result
- public String fwsrc; // peers that helped to construct this result
- public String fwrec; // peers that would have helped to construct this result (recommendations)
public int urlcount; // number of returned LURL's for this search
public int joincount; //
public Map<byte[], Integer> indexcount; //
@@ -991,9 +986,6 @@ public final class Protocol
} catch ( final NumberFormatException e ) {
throw new IOException("wrong output format for count: " + e.getMessage());
}
- this.fwhop = resultMap.get("fwhop");
- this.fwsrc = resultMap.get("fwsrc");
- this.fwrec = resultMap.get("fwrec");
// scan the result map for entries with special prefix
this.indexcount = new TreeMap<byte[], Integer>(Base64Order.enhancedCoder);
this.indexabstract = new TreeMap<byte[], String>(Base64Order.enhancedCoder);
diff --git a/source/net/yacy/search/query/RankingProcess.java b/source/net/yacy/search/query/RankingProcess.java
index e786a635e..6bbe3021e 100644
--- a/source/net/yacy/search/query/RankingProcess.java
+++ b/source/net/yacy/search/query/RankingProcess.java
@@ -52,7 +52,6 @@ import net.yacy.cora.util.CommonPattern;
import net.yacy.cora.util.SpaceExceededException;
import net.yacy.document.Condenser;
import net.yacy.document.LibraryProvider;
-import net.yacy.kelondro.data.meta.DigestURI;
import net.yacy.kelondro.data.meta.URIMetadataRow;
import net.yacy.kelondro.data.word.Word;
import net.yacy.kelondro.data.word.WordReference;
@@ -90,8 +89,6 @@ public final class RankingProcess extends Thread {
protected final ReferenceOrder order;
protected final HandleSet urlhashes; // map for double-check; String/Long relation, addresses ranking number (backreference for deletion)
protected final ScoreMap<String> hostNavigator = new ConcurrentScoreMap<String>(); // a counter for the appearance of host names
- protected final ScoreMap<String> hostHashNavigator; // a counter for the appearance of the host hash (this can be filled during classic remote search)
- protected final Map<String, byte[]> hostHashResolver; // a mapping from a host hash (6 bytes) to the full url hash of one of these urls that have the host hash
protected final Map<String, String> taggingPredicates; // a map from tagging vocabulary names to tagging predicate uris
protected final Map<String, ScoreMap<String>> vocabularyNavigator; // counters for Vocabularies; key is metatag.getVocabularyName()
private boolean remote;
@@ -118,8 +115,6 @@ public final class RankingProcess extends Thread {
this.receivedRemoteReferences = new AtomicInteger(0);
this.order = new ReferenceOrder(this.query.ranking, UTF8.getBytes(this.query.targetlang));
this.urlhashes = new RowHandleSet(URIMetadataRow.rowdef.primaryKeyLength, URIMetadataRow.rowdef.objectOrder, 100);
- this.hostHashNavigator = new ConcurrentScoreMap<String>();
- this.hostHashResolver = new ConcurrentHashMap<String, byte[]>();
this.vocabularyNavigator = new ConcurrentHashMap<String, ScoreMap<String>>();
this.taggingPredicates = new HashMap<String, String>();
for (Tagging t: LibraryProvider.autotagging.getVocabularies()) {
@@ -341,8 +336,8 @@ public final class RankingProcess extends Thread {
}
// collect host navigation information (even if we have only one; this is to provide a switch-off button)
- this.hostHashNavigator.inc(hosthash);
- this.hostHashResolver.put(hosthash, iEntry.urlhash());
+ //this.hostHashNavigator.inc(hosthash);
+ //this.hostHashResolver.put(hosthash, iEntry.urlhash());
// check vocabulary constraint
String subject = YaCyMetadata.hashURI(iEntry.urlhash());
@@ -409,37 +404,7 @@ public final class RankingProcess extends Thread {
}
public ScoreMap<String> getHostNavigator() {
- final ScoreMap<String> result = new ConcurrentScoreMap<String>();
-
- final Iterator<String> domhashs = this.hostHashNavigator.keys(false);
- DigestURI url;
- byte[] urlhash;
- String hosthash, hostname;
- if ( this.hostHashResolver != null ) {
- while ( domhashs.hasNext() && result.sizeSmaller(30) ) {
- hosthash = domhashs.next();
- if ( hosthash == null ) {
- continue;
- }
- urlhash = this.hostHashResolver.get(hosthash);
- url = urlhash == null ? null : this.query.getSegment().fulltext().getURL(urlhash);
- hostname = url == null ? null : url.getHost();
- if ( hostname != null ) {
- result.set(hostname, this.hostHashNavigator.get(hosthash));
- }
- }
- }
-
- // add only navigation hosts which have more than one entry
- Iterator<String> i = this.hostNavigator.keys(false);
- while (i.hasNext()) {
- String h = i.next();
- int c = this.hostNavigator.get(h);
- if (c <= 0) break;
- result.inc(h, c);
- }
-
- return result;
+ return this.hostNavigator;
}
public Map<String,ScoreMap<String>> getVocabularyNavigators() {