diff --git a/htroot/yacysearch_location.java b/htroot/yacysearch_location.java index 028362220..aa1b7b761 100644 --- a/htroot/yacysearch_location.java +++ b/htroot/yacysearch_location.java @@ -66,7 +66,7 @@ public class yacysearch_location { //i.e. http://localhost:8090/yacysearch_location.kml?query=berlin&maximumTime=2000&maximumRecords=100 int placemarkCounter = 0; - if (search_query) { + if (query.length() > 0 && search_query) { final Set locations = LibraryProvider.geoLoc.find(query, true); for (final String qp: query.split(" ")) { locations.addAll(LibraryProvider.geoLoc.find(qp, true)); @@ -88,7 +88,7 @@ public class yacysearch_location { } } - if (metatag || search_title || search_publisher || search_creator || search_subject) try { + if (query.length() > 0 && (metatag || search_title || search_publisher || search_creator || search_subject)) try { // get a queue of search results final String rssSearchServiceURL = "http://127.0.0.1:" + sb.getConfig("port", "8090") + "/yacysearch.rss"; final BlockingQueue results = new LinkedBlockingQueue(); diff --git a/source/net/yacy/document/content/DCEntry.java b/source/net/yacy/document/content/DCEntry.java index 124e311a1..0149047ad 100644 --- a/source/net/yacy/document/content/DCEntry.java +++ b/source/net/yacy/document/content/DCEntry.java @@ -230,7 +230,7 @@ public class DCEntry extends TreeMap { public String[] getSubject() { String t = this.get("categories"); - if (t == null) this.get("dc:subject"); + if (t == null) t = this.get("dc:subject"); t = stripCDATA(t); if (t == null) return new String[]{}; return t.split(";"); @@ -238,7 +238,7 @@ public class DCEntry extends TreeMap { public double getLon() { String t = this.get("geo:long"); - if (t == null) this.get("geo:lon"); + if (t == null) t = this.get("geo:lon"); t = stripCDATA(t); if (t == null) return 0.0d; return Double.parseDouble(t); @@ -246,7 +246,7 @@ public class DCEntry extends TreeMap { public double getLat() { String t = this.get("geo:lat"); - if (t == null) this.get("geo:lat"); + if (t == null) t = this.get("geo:lat"); t = stripCDATA(t); if (t == null) return 0.0d; return Double.parseDouble(t);