diff --git a/htroot/index.html b/htroot/index.html index f2e6d323b..506101f6f 100644 --- a/htroot/index.html +++ b/htroot/index.html @@ -19,7 +19,6 @@ picMinus.src = "/env/grafics/minus.gif";

YaCy logo Kaskelix
P2P WEB SEARCH


#[promoteSearchPageGreeting]#

-
diff --git a/htroot/index.java b/htroot/index.java index 93b1a59bb..fa665eb2a 100644 --- a/htroot/index.java +++ b/htroot/index.java @@ -181,7 +181,7 @@ public class index { } // do the search - plasmaSearchQuery thisSearch = new plasmaSearchQuery(query, maxDistance, count, searchtime, urlmask, referer, + plasmaSearchQuery thisSearch = new plasmaSearchQuery(query, maxDistance, count, searchtime, urlmask, ((global) && (yacyonline) && (!(env.getConfig("last-search","").equals(querystring)))) ? plasmaSearchQuery.SEARCHDOM_GLOBALDHT : plasmaSearchQuery.SEARCHDOM_LOCAL, "", 20); plasmaSearchRankingProfile ranking = new plasmaSearchRankingProfile(new String[]{order1, order2, order3}); diff --git a/htroot/websearch.html b/htroot/websearch.html index 7a00027c1..2a710b496 100644 --- a/htroot/websearch.html +++ b/htroot/websearch.html @@ -16,8 +16,6 @@ picMinus.src = "/env/grafics/minus.gif"; - -

diff --git a/source/de/anomic/plasma/plasmaSearchQuery.java b/source/de/anomic/plasma/plasmaSearchQuery.java index 6b270f902..55a2e31c0 100644 --- a/source/de/anomic/plasma/plasmaSearchQuery.java +++ b/source/de/anomic/plasma/plasmaSearchQuery.java @@ -60,7 +60,6 @@ public final class plasmaSearchQuery { public Set queryWords; public Set queryHashes; - public String referrer; public int wantedResults; public long maximumTime; public String urlMask; @@ -70,7 +69,7 @@ public final class plasmaSearchQuery { public int maxDistance; public plasmaSearchQuery(Set queryWords, int maxDistance, - int wantedResults, long maximumTime, String urlMask, String referrer, + int wantedResults, long maximumTime, String urlMask, int domType, String domGroupName, int domMaxTargets) { this.queryWords = queryWords; this.maxDistance = maxDistance; @@ -78,7 +77,6 @@ public final class plasmaSearchQuery { this.wantedResults = wantedResults; this.maximumTime = maximumTime; this.urlMask = urlMask; - this.referrer = referrer; this.domType = domType; this.domGroupName = domGroupName; this.domMaxTargets = domMaxTargets; diff --git a/source/de/anomic/plasma/plasmaSearchRankingProfile.java b/source/de/anomic/plasma/plasmaSearchRankingProfile.java index 2b87ff986..34399a86b 100644 --- a/source/de/anomic/plasma/plasmaSearchRankingProfile.java +++ b/source/de/anomic/plasma/plasmaSearchRankingProfile.java @@ -43,6 +43,7 @@ package de.anomic.plasma; import java.util.HashMap; import java.util.Iterator; +import java.util.Map; import java.util.Set; public class plasmaSearchRankingProfile { @@ -97,6 +98,16 @@ public class plasmaSearchRankingProfile { coeff.put(DESCRCOMPINTOPLIST, new Integer(11)); } + public plasmaSearchRankingProfile(String profile) { + this(); // set defaults + //parse external form + String[] elts = profile.substring(1, profile.length() - 1).split(","); + int p; + for (int i = 0; i < elts.length; i++) { + coeff.put(elts[i].substring(0, (p = elts[i].indexOf("="))), elts[i].substring(p + 1)); + } + } + public plasmaSearchRankingProfile(String[] order) { this(); // set defaults this.order = order; @@ -112,6 +123,14 @@ public class plasmaSearchRankingProfile { return order[0] + "-" + order[1] + "-" + order[2]; } + public String toExternalForm() { + return coeff.toString(); + } + + public Map coeff() { + return this.coeff; + } + public long preRanking(plasmaWordIndexEntry normalizedEntry) { long ranking = 0;