From 2080fc7406810b0fd9e1302911be6fc6d17abaf9 Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Thu, 14 Mar 2013 10:35:21 +0100 Subject: [PATCH] removed unused tag fields --- defaults/solr.collection.schema | 6 ------ htroot/ConfigHeuristics_p.java | 1 - source/net/yacy/search/schema/CollectionConfiguration.java | 2 -- source/net/yacy/search/schema/CollectionSchema.java | 2 -- source/net/yacy/search/schema/WebgraphConfiguration.java | 5 +---- 5 files changed, 1 insertion(+), 15 deletions(-) diff --git a/defaults/solr.collection.schema b/defaults/solr.collection.schema index 672043868..e6431c3a0 100644 --- a/defaults/solr.collection.schema +++ b/defaults/solr.collection.schema @@ -205,18 +205,12 @@ h6_txt ## content of tag, text #metagenerator_t -## internal links, normalized (absolute URLs), as - tag with anchor text and nofollow -#inboundlinks_tag_txt - ## internal links, only the protocol inboundlinks_protocol_sxt ## internal links, the url only without the protocol inboundlinks_urlstub_txt -## external links, normalized (absolute URLs), as - tag with anchor text and nofollow -#outboundlinks_tag_txt - ## external links, only the protocol outboundlinks_protocol_sxt diff --git a/htroot/ConfigHeuristics_p.java b/htroot/ConfigHeuristics_p.java index 40ef5b316..3b65c8f2e 100644 --- a/htroot/ConfigHeuristics_p.java +++ b/htroot/ConfigHeuristics_p.java @@ -32,7 +32,6 @@ import net.yacy.cora.storage.Configuration; import net.yacy.data.WorkTables; import net.yacy.kelondro.logging.Log; import net.yacy.search.Switchboard; -import net.yacy.search.schema.CollectionSchema; import java.io.IOException; import java.util.Iterator; diff --git a/source/net/yacy/search/schema/CollectionConfiguration.java b/source/net/yacy/search/schema/CollectionConfiguration.java index 7ab4528d9..6df5eaf23 100644 --- a/source/net/yacy/search/schema/CollectionConfiguration.java +++ b/source/net/yacy/search/schema/CollectionConfiguration.java @@ -712,10 +712,8 @@ public class CollectionConfiguration extends SchemaConfiguration implements Seri // list all links WebgraphConfiguration.Subgraph subgraph = webgraph.edges(digestURI, responseHeader, profile.collections(), clickdepth, document.getAnchors(), images, inboundLinks, outboundLinks, citations); doc.webgraphDocuments.addAll(subgraph.edges); - if (allAttr || contains(CollectionSchema.inboundlinks_tag_txt)) add(doc, CollectionSchema.inboundlinks_tag_txt, subgraph.tags[0]); // if inboundlinks_tag_txt can be removed, remove also subgraph.tags if (allAttr || contains(CollectionSchema.inboundlinks_protocol_sxt)) add(doc, CollectionSchema.inboundlinks_protocol_sxt, protocolList2indexedList(subgraph.urlProtocols[0])); if (allAttr || contains(CollectionSchema.inboundlinks_urlstub_txt)) add(doc, CollectionSchema.inboundlinks_urlstub_txt, subgraph.urlStubs[0]); - if (allAttr || contains(CollectionSchema.outboundlinks_tag_txt)) add(doc, CollectionSchema.outboundlinks_tag_txt, subgraph.tags[1]); // if outboundlinks_tag_txt can be removed, remove also subgraph.tags if (allAttr || contains(CollectionSchema.outboundlinks_protocol_sxt)) add(doc, CollectionSchema.outboundlinks_protocol_sxt, protocolList2indexedList(subgraph.urlProtocols[1])); if (allAttr || contains(CollectionSchema.outboundlinks_urlstub_txt)) add(doc, CollectionSchema.outboundlinks_urlstub_txt, subgraph.urlStubs[1]); diff --git a/source/net/yacy/search/schema/CollectionSchema.java b/source/net/yacy/search/schema/CollectionSchema.java index 16fd871ed..03adcacdc 100644 --- a/source/net/yacy/search/schema/CollectionSchema.java +++ b/source/net/yacy/search/schema/CollectionSchema.java @@ -111,10 +111,8 @@ public enum CollectionSchema implements SchemaDeclaration { metagenerator_t(SolrType.text_general, true, true, false, false, false, "content of tag"), inboundlinks_protocol_sxt(SolrType.string, true, true, true, false, false, "internal links, only the protocol"), inboundlinks_urlstub_txt(SolrType.text_general, true, true, true, false, false, "internal links, the url only without the protocol"), - inboundlinks_tag_txt(SolrType.text_general, true, true, true, false, false, "internal links, normalized (absolute URLs), as - tag with anchor text and nofollow"), outboundlinks_protocol_sxt(SolrType.string, true, true, true, false, false, "external links, only the protocol"), outboundlinks_urlstub_txt(SolrType.text_general, true, true, true, false, false, "external links, the url only without the protocol"), - outboundlinks_tag_txt(SolrType.text_general, true, true, true, false, false, "external links, normalized (absolute URLs), as - tag with anchor text and nofollow"), images_tag_txt(SolrType.text_general, true, true, true, false, true, " all image tags, encoded as tag inclusive alt- and title property"), images_urlstub_txt(SolrType.text_general, true, true, true, false, true, "all image links without the protocol and '://'"), diff --git a/source/net/yacy/search/schema/WebgraphConfiguration.java b/source/net/yacy/search/schema/WebgraphConfiguration.java index c7fb52110..415a34da7 100644 --- a/source/net/yacy/search/schema/WebgraphConfiguration.java +++ b/source/net/yacy/search/schema/WebgraphConfiguration.java @@ -96,11 +96,10 @@ public class WebgraphConfiguration extends SchemaConfiguration implements Serial } public static class Subgraph { - public final ArrayList[] tags, urlProtocols, urlStubs; + public final ArrayList[] urlProtocols, urlStubs; public final ArrayList edges; @SuppressWarnings("unchecked") public Subgraph(int inboundSize, int outboundSize) { - this.tags = new ArrayList[]{new ArrayList(inboundSize), new ArrayList(outboundSize)}; this.urlProtocols = new ArrayList[]{new ArrayList(inboundSize), new ArrayList(outboundSize)}; this.urlStubs = new ArrayList[]{new ArrayList(inboundSize), new ArrayList(outboundSize)}; this.edges = new ArrayList(inboundSize + outboundSize); @@ -208,8 +207,6 @@ public class WebgraphConfiguration extends SchemaConfiguration implements Serial if (allAttr || contains(WebgraphSchema.target_linktext_t)) add(edge, WebgraphSchema.target_linktext_t, text.length() > 0 ? text : ""); if (allAttr || contains(WebgraphSchema.target_linktext_charcount_i)) add(edge, WebgraphSchema.target_linktext_charcount_i, text.length()); if (allAttr || contains(WebgraphSchema.target_linktext_wordcount_i)) add(edge, WebgraphSchema.target_linktext_wordcount_i, text.length() > 0 ? CommonPattern.SPACE.split(text).length : 0); - String tag = " 0 ? " rel=\"" + rel + "\"" : "") + (name.length() > 0 ? " name=\"" + name + "\"" : "") + ">" + ((text.length() > 0) ? text : "") + ""; - subgraph.tags[ioidx].add(tag); ImageEntry ientry = images.get(target_url); String alttext = ientry == null ? "" : ientry.alt(); if (allAttr || contains(WebgraphSchema.target_alt_t)) add(edge, WebgraphSchema.target_alt_t, alttext);