diff --git a/htroot/HostBrowser.html b/htroot/HostBrowser.html index 051403ae6..d53a202b0 100644 --- a/htroot/HostBrowser.html +++ b/htroot/HostBrowser.html @@ -85,18 +85,18 @@ function updatepage(str) { #(/hosts)# #(files)#:: -
Files in #[path]# -

Documents in domain: #[hostsize]#; Documents in subpath: #[subpathsize]#

+
Browser for #[path]# +

Documents on host: #[hostsize]#; Documents in subpath: #[subpathsize]#

- - + + #(root)# - + :: #(/root)# @@ -104,11 +104,11 @@ function updatepage(str) { #(type)# - + :: - + #(/type)# diff --git a/htroot/HostBrowser.java b/htroot/HostBrowser.java index ab4f68784..57854b358 100644 --- a/htroot/HostBrowser.java +++ b/htroot/HostBrowser.java @@ -39,6 +39,7 @@ import net.yacy.cora.sorting.ReversibleScoreMap; import net.yacy.kelondro.logging.Log; import net.yacy.search.Switchboard; import net.yacy.search.index.Fulltext; +import net.yacy.search.index.SolrConfiguration; import net.yacy.server.serverObjects; import net.yacy.server.serverSwitch; @@ -124,8 +125,8 @@ public class HostBrowser { String u = (String) doc.getFieldValue(YaCySchema.sku.name()); hostsize++; if (u.startsWith(path)) storedDocs.add(u); - Collection urlprot = doc.getFieldValues(YaCySchema.inboundlinks_protocol_sxt.name()); Collection urlstub = doc.getFieldValues(YaCySchema.inboundlinks_urlstub_txt.name()); + Collection urlprot = urlstub == null ? null : SolrConfiguration.indexedList2protocolList(doc.getFieldValues(YaCySchema.inboundlinks_protocol_sxt.name()), urlstub.size()); if (urlprot != null && urlstub != null) { assert urlprot.size() == urlstub.size(); Object[] urlprota = urlprot.toArray(); diff --git a/htroot/env/base.css b/htroot/env/base.css index 3561a460c..3a22fcc7c 100644 --- a/htroot/env/base.css +++ b/htroot/env/base.css @@ -150,6 +150,16 @@ tt, *.tt { display:hidden; } +.listing { + font-family:Courier,Terminal,sans-serif; + color:black; +} + +.listingem { + font-family:Courier,Terminal,sans-serif; + color:DimGray; +} + /* .snippetLoaded { font-style:italic; color: #666; diff --git a/source/net/yacy/search/index/SolrConfiguration.java b/source/net/yacy/search/index/SolrConfiguration.java index fd8ded0ac..ec9290541 100644 --- a/source/net/yacy/search/index/SolrConfiguration.java +++ b/source/net/yacy/search/index/SolrConfiguration.java @@ -775,6 +775,15 @@ public class SolrConfiguration extends ConfigurationSet implements Serializable return doc; } + /** + * this method compresses a list of protocol names to an indexed list. + * To do this, all 'http' entries are removed and considered as default. + * The remaining entries are indexed as follows: a list of -

entries is produced, where + * is an index pointing to the original index of the protocol entry and

is the protocol entry itself. + * The entry is formatted as a 3-digit decimal number with leading zero digits. + * @param protocol + * @return a list of indexed protocol entries + */ private static List protocolList2indexedList(List protocol) { List a = new ArrayList(); String p; @@ -788,7 +797,15 @@ public class SolrConfiguration extends ConfigurationSet implements Serializable } return a; } - + + public static List indexedList2protocolList(Collection iplist, int dimension) { + List a = new ArrayList(dimension); + for (int i = 0; i < dimension; i++) a.add("http"); + if (iplist == null) return a; + for (Object ip: iplist) a.set(Integer.parseInt(((String) ip).substring(0, 3)), ((String) ip).substring(4)); + return a; + } + /** * encode a string containing attributes from anchor rel properties binary: * bit 0: "me" contained in rel

PathDocumentsPathDocuments
....
#[file]# #[file]# 
#[file]##[file]# #[count]#