Skip to content

Commit

Permalink
- fix for multi-word search for locations
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
orbiter committed May 20, 2010
1 parent 7f35e19 commit 6ec9ced
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
5 changes: 3 additions & 2 deletions htroot/yacysearch_location.html
Expand Up @@ -44,9 +44,10 @@
);

#(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);
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);
#(/initsearch)#
}
Expand Down
3 changes: 3 additions & 0 deletions htroot/yacysearch_location.java
Expand Up @@ -69,6 +69,9 @@ public static serverObjects respond(final RequestHeader header, final serverObje
int placemarkCounter = 0;
if (search_query) {
Set<Location> locations = LibraryProvider.geoLoc.find(query, true);
for (String qp: query.split(" ")) {
locations.addAll(LibraryProvider.geoLoc.find(qp, true));
}
for (Location location: locations) {
// write for all locations a point to this message
prop.put("kml_placemark_" + placemarkCounter + "_location", location.getName());
Expand Down
2 changes: 1 addition & 1 deletion htroot/yacysearch_location.rss
Expand Up @@ -19,7 +19,7 @@
<title><![CDATA[#[location]#]]></title>
<link>#[url]#</link>
<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:lat>#[lat]#</geo:lat>
</item>
Expand Down
2 changes: 1 addition & 1 deletion source/de/anomic/yacy/yacyClient.java
Expand Up @@ -507,7 +507,7 @@ public static RSSFeed search(String urlBase, String query, boolean verify, boole

// prepare request
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("maximumRecords", Long.toString(maximumRecords)));
post.add(new DefaultCharsetStringPart("verify", verify ? "true" : "false"));
Expand Down

0 comments on commit 6ec9ced

Please sign in to comment.