From a34d9b86092bcb9c295be7626be2dd5a180665e2 Mon Sep 17 00:00:00 2001 From: orbiter Date: Fri, 24 Aug 2007 23:12:59 +0000 Subject: [PATCH] * added a search history cache that maintains search results for 10 minutes it is necessary for the new search process that will do automatic re-searches a positive effect is, that when a re-search is done it can be monitored how many results had been contributed from other peers. The message for this contribution was moved from the end of the result page to the top. * enhanced re-search time when a global search was done an the local index has already a great number of results for this word * re-organised presearch computation; must be further enhanced git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4059 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/Ranking_p.java | 5 +- htroot/yacy/search.java | 6 +- htroot/yacysearch.html | 18 +- htroot/yacysearch.java | 53 +-- source/de/anomic/index/indexContainer.java | 10 +- source/de/anomic/index/indexRAMRI.java | 8 +- .../de/anomic/plasma/plasmaSearchEvent.java | 313 ++++++++++-------- .../anomic/plasma/plasmaSearchPostOrder.java | 8 +- .../anomic/plasma/plasmaSearchPreOrder.java | 17 +- .../anomic/plasma/plasmaSearchProcessing.java | 4 +- .../de/anomic/plasma/plasmaSearchQuery.java | 12 +- .../plasma/plasmaSearchRankingProfile.java | 21 +- .../plasma/plasmaSearchResultAccumulator.java | 21 +- .../de/anomic/plasma/plasmaSwitchboard.java | 2 +- source/de/anomic/plasma/plasmaWordIndex.java | 10 +- source/de/anomic/server/serverDomains.java | 1 + source/de/anomic/yacy/yacyClient.java | 2 +- 17 files changed, 274 insertions(+), 237 deletions(-) diff --git a/htroot/Ranking_p.java b/htroot/Ranking_p.java index a362894b3..eeaefd6a6 100644 --- a/htroot/Ranking_p.java +++ b/htroot/Ranking_p.java @@ -30,6 +30,7 @@ import java.util.Iterator; import java.util.Map; import de.anomic.http.httpHeader; +import de.anomic.plasma.plasmaSearchQuery; import de.anomic.plasma.plasmaSearchRankingProfile; import de.anomic.plasma.plasmaSwitchboard; import de.anomic.server.serverObjects; @@ -132,7 +133,7 @@ public class Ranking_p { final serverObjects prop = defaultValues(); plasmaSearchRankingProfile ranking = (sb.getConfig("rankingProfile", "").length() == 0) ? - new plasmaSearchRankingProfile("text") : + new plasmaSearchRankingProfile(plasmaSearchQuery.CONTENTDOM_TEXT) : new plasmaSearchRankingProfile("", crypt.simpleDecode(sb.getConfig("rankingProfile", ""), null)); putRanking(prop, ranking, "local"); return prop; @@ -149,7 +150,7 @@ public class Ranking_p { if (post.containsKey("ResetRanking")) { sb.setConfig("rankingProfile", ""); - plasmaSearchRankingProfile ranking = new plasmaSearchRankingProfile("text"); + plasmaSearchRankingProfile ranking = new plasmaSearchRankingProfile(plasmaSearchQuery.CONTENTDOM_TEXT); final serverObjects prop = defaultValues(); //prop.putAll(ranking.toExternalMap("local")); putRanking(prop, ranking, "local"); diff --git a/htroot/yacy/search.java b/htroot/yacy/search.java index 3e136caf6..823e65d2b 100644 --- a/htroot/yacy/search.java +++ b/htroot/yacy/search.java @@ -164,7 +164,7 @@ public final class search { yacyCore.log.logInfo("INIT HASH SEARCH (query-" + abstracts + "): " + plasmaSearchQuery.anonymizedQueryHashes(squery.queryHashes) + " - " + squery.wantedResults + " links"); // prepare a search profile - plasmaSearchRankingProfile rankingProfile = (profile.length() == 0) ? new plasmaSearchRankingProfile(contentdom) : new plasmaSearchRankingProfile("", profile); + plasmaSearchRankingProfile rankingProfile = (profile.length() == 0) ? new plasmaSearchRankingProfile(plasmaSearchQuery.contentdomParser(contentdom)) : new plasmaSearchRankingProfile("", profile); plasmaSearchProcessing localProcess = new plasmaSearchProcessing(squery.maximumTime, squery.wantedResults); //plasmaSearchProcessing remoteProcess = null; @@ -208,7 +208,7 @@ public final class search { // join and order the result indexContainer localResults = (containers == null) ? - plasmaWordIndex.emptyContainer(null) : + plasmaWordIndex.emptyContainer(null, 0) : localProcess.localSearchJoinExclude( containers[0].values(), containers[1].values(), @@ -223,7 +223,7 @@ public final class search { joincount = localResults.size(); prop.putASIS("joincount", Integer.toString(joincount)); plasmaSearchPreOrder pre = new plasmaSearchPreOrder(squery, localProcess, rankingProfile, localResults); - accu = new plasmaSearchResultAccumulator(squery, localProcess, rankingProfile, pre, sb.wordIndex, plasmaSwitchboard.blueList, false); + accu = new plasmaSearchResultAccumulator(squery, localProcess, rankingProfile, pre.strippedContainer(200), sb.wordIndex, plasmaSwitchboard.blueList, false); } // generate compressed index for maxcounthash diff --git a/htroot/yacysearch.html b/htroot/yacysearch.html index 16bc51aaa..df9d415cd 100644 --- a/htroot/yacysearch.html +++ b/htroot/yacysearch.html @@ -116,7 +116,7 @@ document.getElementById("Enter").value = "search again - catch up more links"; ::

No Results. "#[wrong_regex]#" is no valid regular expression. Please go back to the previous page and make sure to enter a valid regular expressions for URL mask and Prefer mask.

:: -

#[linkcount]# results from #[orderedcount]# ordered links from #[filteredcount]# filtered links of a total number of #[totalcount]# known.

+

#[linkcount]# results from #[orderedcount]# ordered links from #[filteredcount]# filtered links of a total number of #[totalcount]# known#(globalresults)#.::, #[globalcount]# links from other YaCy peers.#(/globalresults)#

::

Searching the web with this peer is disabled for unauthorized users. Please log in as administrator to use the search function

#(/num-results)# @@ -164,21 +164,7 @@ document.getElementById("Enter").value = "search again - catch up more links"; - #(resultbottomline)# - :: -

The global search resulted in #[globalresults]# link contributions from other YaCy peers.

- :: -

- :: -

- You cannot get global search results because you are not connected to another YaCy peer. -

- :: -

- You can enrich the search results by using the 'global' option; you must also switch to online mode - (by using the proxy) to contribute to the global index. -

- #(/resultbottomline)# + ::