mirror of
https://github.com/yacy/yacy_search_server.git
synced 2025-07-21 09:04:37 -04:00
some bugfix for statistics
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3211 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
@ -60,7 +60,7 @@ public class SearchStatisticsRemote_p {
|
||||
prop.put("list_" + entCount + "_dark", ((dark) ? 1 : 0) ); dark =! dark;
|
||||
prop.put("list_" + entCount + "_host", (String) searchProfile.get("host"));
|
||||
prop.put("list_" + entCount + "_date", (new Date(trackerHandle.longValue())).toString());
|
||||
prop.put("list_" + entCount + "_queryhashes", plasmaSearchQuery.hashSet2hashString((Set) searchProfile.get("queryhashes")));
|
||||
prop.put("list_" + entCount + "_queryhashes", plasmaSearchQuery.anonymizedQueryHashes((Set) searchProfile.get("queryhashes")));
|
||||
prop.put("list_" + entCount + "_querycount", ((Integer) searchProfile.get("querycount")).toString());
|
||||
prop.put("list_" + entCount + "_querytime", ((Long) searchProfile.get("querytime")).toString());
|
||||
prop.put("list_" + entCount + "_resultcount", ((Integer) searchProfile.get("resultcount")).toString());
|
||||
@ -71,7 +71,7 @@ public class SearchStatisticsRemote_p {
|
||||
}
|
||||
prop.put("list", entCount);
|
||||
prop.put("num", entCount);
|
||||
prop.put("total", switchboard.localSearches.size());
|
||||
prop.put("total", switchboard.remoteSearches.size());
|
||||
// return rewrite properties
|
||||
return prop;
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ public final class search {
|
||||
// this is _not_ a normal search, only a request for index abstracts
|
||||
squery = new plasmaSearchQuery(abstractSet, maxdist, prefer, plasmaSearchQuery.contentdomParser(contentdom), count, duetime, filter, plasmaSearchQuery.catchall_constraint);
|
||||
squery.domType = plasmaSearchQuery.SEARCHDOM_LOCAL;
|
||||
yacyCore.log.logInfo("INIT HASH SEARCH (abstracts only): " + squery.anonymizedQueryHashes() + " - " + squery.wantedResults + " links");
|
||||
yacyCore.log.logInfo("INIT HASH SEARCH (abstracts only): " + plasmaSearchQuery.anonymizedQueryHashes(squery.queryHashes) + " - " + squery.wantedResults + " links");
|
||||
|
||||
// prepare a search profile
|
||||
plasmaSearchRankingProfile rankingProfile = (profile.length() == 0) ? new plasmaSearchRankingProfile(contentdom) : new plasmaSearchRankingProfile("", profile);
|
||||
@ -170,7 +170,7 @@ public final class search {
|
||||
// retrieve index containers from search request
|
||||
squery = new plasmaSearchQuery(keyhashes, maxdist, prefer, plasmaSearchQuery.contentdomParser(contentdom), count, duetime, filter, constraint);
|
||||
squery.domType = plasmaSearchQuery.SEARCHDOM_LOCAL;
|
||||
yacyCore.log.logInfo("INIT HASH SEARCH (query-" + abstracts + "): " + squery.anonymizedQueryHashes() + " - " + squery.wantedResults + " links");
|
||||
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);
|
||||
@ -305,7 +305,7 @@ public final class search {
|
||||
prop.put("fwrec", ""); // peers that would have helped to construct this result (recommendations)
|
||||
|
||||
// log
|
||||
yacyCore.log.logInfo("EXIT HASH SEARCH: " + squery.anonymizedQueryHashes() + " - " + joincount + " links found, " + prop.get("linkcount", "?") + " links selected, " + ((System.currentTimeMillis() - timestamp1) / 1000) + " seconds");
|
||||
yacyCore.log.logInfo("EXIT HASH SEARCH: " + plasmaSearchQuery.anonymizedQueryHashes(squery.queryHashes) + " - " + joincount + " links found, " + prop.get("linkcount", "?") + " links selected, " + ((System.currentTimeMillis() - timestamp1) / 1000) + " seconds");
|
||||
|
||||
prop.put("searchtime", Long.toString(System.currentTimeMillis() - timestamp));
|
||||
|
||||
|
@ -200,11 +200,11 @@ public final class plasmaSearchQuery {
|
||||
if (blueList.contains(word)) it.remove();
|
||||
}
|
||||
}
|
||||
|
||||
public String anonymizedQueryHashes() {
|
||||
|
||||
public static String anonymizedQueryHashes(Set hashes) {
|
||||
// create a more anonymized representation of euqery hashes for logging
|
||||
StringBuffer sb = new StringBuffer(queryHashes.size() * 14 + 2);
|
||||
Iterator i = queryHashes.iterator();
|
||||
StringBuffer sb = new StringBuffer(hashes.size() * 14 + 2);
|
||||
Iterator i = hashes.iterator();
|
||||
sb.append("[");
|
||||
String hash;
|
||||
if (i.hasNext()) {
|
||||
@ -218,5 +218,5 @@ public final class plasmaSearchQuery {
|
||||
sb.append("]");
|
||||
return new String(sb);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user