Skip to content

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

added additional properties to query id's to distinguish search events better

orbiterdf4ff423c415
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<String> hashes) {
- // create a more anonymized representation of euqery hashes for logging
+ // create a more anonymized representation of a query hashes for logging
final Iterator<String> 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;
}
}