Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
fixes to location search
Michael Peter Christen1ab3de08855a
diff --git a/htroot/yacysearch_location.html b/htroot/yacysearch_location.htmlindex 5e21d512c..71061019f 100644--- a/htroot/yacysearch_location.html+++ b/htroot/yacysearch_location.html@@ -15,11 +15,11 @@var map;var searchLayer_md = null;var searchLayer_co = null;- var path_mdsearch = 'yacysearch_location.rss?dom=metatag&query=';- var path_cosearch = 'yacysearch_location.rss?dom=query&query=';+ var path_mdsearch = 'yacysearch_location.rss?dom=alltext&query=';+ var path_losearch = 'yacysearch_location.rss?dom=location&query=';var marker_md = new OpenLayers.Icon("/env/grafics/marker_red.png", new OpenLayers.Size(11,16));var marker_co = new OpenLayers.Icon("/env/grafics/star_yellow.png", new OpenLayers.Size(25,25));- // possible values for dom: query,metatag,alltext,title,publisher,creator,subject+ // possible values for dom: location,metatag,alltext,title,publisher,creator,subjectfunction init() {map = new OpenLayers.Map('map', {@@ -51,7 +51,7 @@#(initsearch)#::var query = '#[query]#'.replace(' ', '+');- searchLayer_co = new OpenLayers.Layer.GeoRSS('GeoRSS', path_cosearch + query, {'icon':marker_co});+ searchLayer_co = new OpenLayers.Layer.GeoRSS('GeoRSS', path_losearch + query, {'icon':marker_co});map.addLayer(searchLayer_co);searchLayer_md = new OpenLayers.Layer.GeoRSS('GeoRSS', path_mdsearch + query, {'icon':marker_md});map.addLayer(searchLayer_md);@@ -63,7 +63,7 @@if (searchLayer_md != null) searchLayer_md.destroy();if (searchLayer_co != null) searchLayer_co.destroy();var center = map.getCenter().transform(new OpenLayers.Projection("EPSG:900913"), new OpenLayers.Projection("EPSG:4326"));- searchLayer_co = new OpenLayers.Layer.GeoRSS('GeoRSS', path_cosearch + query + '&lon=' + center.lon + '&lat=' + center.lat + '&zoom=' + map.getZoom(), {'icon':marker_co});+ searchLayer_co = new OpenLayers.Layer.GeoRSS('GeoRSS', path_losearch + query + '&lon=' + center.lon + '&lat=' + center.lat + '&zoom=' + map.getZoom(), {'icon':marker_co});map.addLayer(searchLayer_co);searchLayer_md = new OpenLayers.Layer.GeoRSS('GeoRSS', path_mdsearch + query, {'icon':marker_md});map.addLayer(searchLayer_md);diff --git a/htroot/yacysearch_location.java b/htroot/yacysearch_location.javaindex b02533fb7..efd40d928 100644--- a/htroot/yacysearch_location.java+++ b/htroot/yacysearch_location.java@@ -54,7 +54,7 @@ public class yacysearch_location {prop.put("kml", 1);if (post == null) return prop;final String query = post.get("query", "");- final boolean search_query = post.get("dom", "").indexOf("query",0) >= 0;+ final boolean search_query = post.get("dom", "").indexOf("location",0) >= 0;final boolean metatag = post.get("dom", "").indexOf("metatag",0) >= 0;final boolean alltext = post.get("dom", "").indexOf("alltext",0) >= 0;final boolean search_title = alltext || post.get("dom", "").indexOf("title",0) >= 0;@@ -97,6 +97,7 @@ public class yacysearch_location {// take the results and compute some locationsRSSMessage message;loop: while ((message = results.poll(maximumTime, TimeUnit.MILLISECONDS)) != RSSMessage.POISON) {+ if (message == null) break loop;// find all associated locationsfinal Set<Location> locations = new HashSet<Location>();