- fix for multi-word search for locations

- changed description text to 'title' entity (subject is a list of keywords and was very messed)
- added ViewFile in location pop-up

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6891 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 15 years ago
parent 7f35e1955e
commit 6ec9ced4cd

@ -44,9 +44,10 @@
); );
#(initsearch)#:: #(initsearch)#::
searchLayer_co = new OpenLayers.Layer.GeoRSS('GeoRSS', path_cosearch + '#[query]#', {'icon':marker_co}); var query = '#[query]#'.replace(' ', '+');
searchLayer_co = new OpenLayers.Layer.GeoRSS('GeoRSS', path_cosearch + query, {'icon':marker_co});
map.addLayer(searchLayer_co); map.addLayer(searchLayer_co);
searchLayer_md = new OpenLayers.Layer.GeoRSS('GeoRSS', path_mdsearch + '#[query]#', {'icon':marker_md}); searchLayer_md = new OpenLayers.Layer.GeoRSS('GeoRSS', path_mdsearch + query, {'icon':marker_md});
map.addLayer(searchLayer_md); map.addLayer(searchLayer_md);
#(/initsearch)# #(/initsearch)#
} }

@ -69,6 +69,9 @@ public class yacysearch_location {
int placemarkCounter = 0; int placemarkCounter = 0;
if (search_query) { if (search_query) {
Set<Location> locations = LibraryProvider.geoLoc.find(query, true); Set<Location> locations = LibraryProvider.geoLoc.find(query, true);
for (String qp: query.split(" ")) {
locations.addAll(LibraryProvider.geoLoc.find(qp, true));
}
for (Location location: locations) { for (Location location: locations) {
// write for all locations a point to this message // write for all locations a point to this message
prop.put("kml_placemark_" + placemarkCounter + "_location", location.getName()); prop.put("kml_placemark_" + placemarkCounter + "_location", location.getName());

@ -19,7 +19,7 @@
<title><![CDATA[#[location]#]]></title> <title><![CDATA[#[location]#]]></title>
<link>#[url]#</link> <link>#[url]#</link>
<pubDate>#[date]#</pubDate> <pubDate>#[date]#</pubDate>
<summary><![CDATA[#[subject]#]]></summary> <summary><![CDATA[<a href="#[url]#">#[url]#</a><br/><br/>#[name]#<br/><br/><a href="ViewFile.html?url=#[url]#">[metadata]</a>]]></summary>
<geo:long>#[lon]#</geo:long> <geo:long>#[lon]#</geo:long>
<geo:lat>#[lat]#</geo:lat> <geo:lat>#[lat]#</geo:lat>
</item> </item>

@ -507,7 +507,7 @@ public final class yacyClient {
// prepare request // prepare request
final List<Part> post = new ArrayList<Part>(); final List<Part> post = new ArrayList<Part>();
post.add(new DefaultCharsetStringPart("query", query.replaceAll(" ", "+"))); post.add(new DefaultCharsetStringPart("query", query));
post.add(new DefaultCharsetStringPart("startRecord", Integer.toString(startRecord))); post.add(new DefaultCharsetStringPart("startRecord", Integer.toString(startRecord)));
post.add(new DefaultCharsetStringPart("maximumRecords", Long.toString(maximumRecords))); post.add(new DefaultCharsetStringPart("maximumRecords", Long.toString(maximumRecords)));
post.add(new DefaultCharsetStringPart("verify", verify ? "true" : "false")); post.add(new DefaultCharsetStringPart("verify", verify ? "true" : "false"));

Loading…
Cancel
Save