Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
fix for source and target clickdepth in webgraph index
Michael Peter Christen61ad194065d1
diff --git a/source/net/yacy/cora/federate/solr/SchemaConfiguration.java b/source/net/yacy/cora/federate/solr/SchemaConfiguration.javaindex fc9bf0472..1eabf6fd8 100644--- a/source/net/yacy/cora/federate/solr/SchemaConfiguration.java+++ b/source/net/yacy/cora/federate/solr/SchemaConfiguration.java@@ -179,7 +179,6 @@ public class SchemaConfiguration extends Configuration implements Serializable {}public boolean postprocessing_clickdepth(final ClickdepthCache clickdepthCache, final SolrInputDocument sid, final DigestURL url, final SchemaDeclaration clickdepthfield, final int maxtime) {- if (!this.contains(clickdepthfield)) return false;// get new click depth and compare with oldInteger oldclickdepth = (Integer) sid.getFieldValue(clickdepthfield.getSolrFieldName());if (oldclickdepth != null && oldclickdepth.intValue() != 999) return false; // we do not want to compute that againdiff --git a/source/net/yacy/search/schema/CollectionConfiguration.java b/source/net/yacy/search/schema/CollectionConfiguration.javaindex 9e45ef3b9..84b344133 100644--- a/source/net/yacy/search/schema/CollectionConfiguration.java+++ b/source/net/yacy/search/schema/CollectionConfiguration.java@@ -1161,7 +1161,7 @@ public class CollectionConfiguration extends SchemaConfiguration implements Seri// switch over tag typesProcessType tagtype = ProcessType.valueOf((String) tag);- if (tagtype == ProcessType.CLICKDEPTH) {+ if (tagtype == ProcessType.CLICKDEPTH && collection.contains(CollectionSchema.clickdepth_i)) {if (postprocessing_clickdepth(clickdepthCache, sid, url, CollectionSchema.clickdepth_i, 100)) proccount_clickdepthchange++;}diff --git a/source/net/yacy/search/schema/WebgraphConfiguration.java b/source/net/yacy/search/schema/WebgraphConfiguration.javaindex 66dddd21f..e5a4be458 100644--- a/source/net/yacy/search/schema/WebgraphConfiguration.java+++ b/source/net/yacy/search/schema/WebgraphConfiguration.java@@ -208,9 +208,9 @@ public class WebgraphConfiguration extends SchemaConfiguration implements Serialadd(edge, WebgraphSchema.source_path_folders_count_i, paths.length);add(edge, WebgraphSchema.source_path_folders_sxt, paths);}- if (this.contains(WebgraphSchema.source_clickdepth_i) && this.contains(WebgraphSchema.source_protocol_s) && this.contains(WebgraphSchema.source_urlstub_s) && this.contains(WebgraphSchema.source_id_s)) {+ if ((allAttr || contains(WebgraphSchema.source_clickdepth_i)) && this.contains(WebgraphSchema.source_protocol_s) && this.contains(WebgraphSchema.source_urlstub_s) && this.contains(WebgraphSchema.source_id_s)) {add(edge, WebgraphSchema.source_clickdepth_i, clickdepth_source);- if (clickdepth_source < 0 || clickdepth_source > 1) processTypes.add(ProcessType.CLICKDEPTH);+ processTypes.add(ProcessType.CLICKDEPTH); // postprocessing needed; this is also needed if the depth is positive; there could be a shortcut}// add the source attributes about the target@@ -276,16 +276,14 @@ public class WebgraphConfiguration extends SchemaConfiguration implements Serialadd(edge, WebgraphSchema.target_path_folders_sxt, paths);}- if (this.contains(WebgraphSchema.target_protocol_s) && this.contains(WebgraphSchema.target_urlstub_s) && this.contains(WebgraphSchema.target_id_s)) {- if ((allAttr || contains(WebgraphSchema.target_clickdepth_i))) {- if (target_url.probablyRootURL()) {- boolean lc = this.lazy; this.lazy = false;- add(edge, WebgraphSchema.target_clickdepth_i, 0);- this.lazy = lc;- } else {- add(edge, WebgraphSchema.target_clickdepth_i, 999);- processTypes.add(ProcessType.CLICKDEPTH); // postprocessing needed; this is also needed if the depth is positive; there could be a shortcut- }+ if ((allAttr || contains(WebgraphSchema.target_clickdepth_i)) && this.contains(WebgraphSchema.target_protocol_s) && this.contains(WebgraphSchema.target_urlstub_s) && this.contains(WebgraphSchema.target_id_s)) {+ if (target_url.probablyRootURL()) {+ boolean lc = this.lazy; this.lazy = false;+ add(edge, WebgraphSchema.target_clickdepth_i, 0);+ this.lazy = lc;+ } else {+ add(edge, WebgraphSchema.target_clickdepth_i, 999);+ processTypes.add(ProcessType.CLICKDEPTH); // postprocessing needed; this is also needed if the depth is positive; there could be a shortcut}}