- apply fix for localhost handling (from yacy2solr) also to metadata2solr

pull/1/head
reger 12 years ago
parent 0148f1bb8c
commit 4987caf1c9

@ -206,7 +206,7 @@ public class SolrConfiguration extends ConfigurationSet implements Serializable
String host = null; String host = null;
if ((host = digestURI.getHost()) != null) { if ((host = digestURI.getHost()) != null) {
String dnc = Domains.getDNC(host); String dnc = Domains.getDNC(host);
String subdomOrga = host.substring(0, host.length() - dnc.length() - 1); String subdomOrga = host.length() - dnc.length() <= 0 ? "" : host.substring(0, host.length() - dnc.length() - 1);
int p = subdomOrga.lastIndexOf('.'); int p = subdomOrga.lastIndexOf('.');
String subdom = (p < 0) ? "" : subdomOrga.substring(0, p); String subdom = (p < 0) ? "" : subdomOrga.substring(0, p);
String orga = (p < 0) ? subdomOrga : subdomOrga.substring(p + 1); String orga = (p < 0) ? subdomOrga : subdomOrga.substring(p + 1);

Loading…
Cancel
Save