From df4ff423c415af29271cfe39e7e382f5960db566 Mon Sep 17 00:00:00 2001 From: orbiter Date: Thu, 28 Aug 2008 21:15:59 +0000 Subject: [PATCH] added additional properties to query id's to distinguish search events better git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5093 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/plasma/plasmaSearchQuery.java | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/source/de/anomic/plasma/plasmaSearchQuery.java b/source/de/anomic/plasma/plasmaSearchQuery.java index ca980e780..4ab75290c 100644 --- a/source/de/anomic/plasma/plasmaSearchQuery.java +++ b/source/de/anomic/plasma/plasmaSearchQuery.java @@ -203,7 +203,7 @@ public final class plasmaSearchQuery { } public static String anonymizedQueryHashes(final Set hashes) { - // create a more anonymized representation of euqery hashes for logging + // create a more anonymized representation of a query hashes for logging final Iterator i = hashes.iterator(); final StringBuffer sb = new StringBuffer(hashes.size() * (yacySeedDB.commonHashLength + 2) + 2); sb.append("["); @@ -281,10 +281,18 @@ public final class plasmaSearchQuery { public String id(final boolean anonymized) { // generate a string that identifies a search so results can be re-used in a cache - if (anonymized) { - return anonymizedQueryHashes(this.queryHashes) + "-" + anonymizedQueryHashes(this.excludeHashes) + "*" + this.contentdom + "*" + this.zonecode + "*" + indexWord.word2hash(this.ranking.toExternalString()); - } - return hashSet2hashString(this.queryHashes) + "-" + hashSet2hashString(this.excludeHashes) + "*" + this.contentdom + "*" + this.zonecode + "*" + indexWord.word2hash(this.ranking.toExternalString()); + String context = + "*" + this.domType + + "*" + this.contentdom + + "*" + this.zonecode + + "*" + indexWord.word2hash(this.ranking.toExternalString()) + + "*" + this.prefer + + "*" + this.urlMask + + "*" + this.constraint; + if (anonymized) + return anonymizedQueryHashes(this.queryHashes) + "-" + anonymizedQueryHashes(this.excludeHashes) + context; + else + return hashSet2hashString(this.queryHashes) + "-" + hashSet2hashString(this.excludeHashes) + context; } }