Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

fixed location search

Michael Peter Christen30d4402cd1bb
diff --git a/source/net/yacy/cora/document/feed/RSSMessage.java b/source/net/yacy/cora/document/feed/RSSMessage.java
index e02ccb8c2..6aa77c4af 100644
--- a/source/net/yacy/cora/document/feed/RSSMessage.java
+++ b/source/net/yacy/cora/document/feed/RSSMessage.java
@@ -61,8 +61,8 @@ public class RSSMessage implements Hit, Comparable<RSSMessage>, Comparator<RSSMe
ttl(new String[]{"ttl"}),
docs(new String[]{"docs"}),
size(new String[]{"size","length","yacy:size"}),
- lon(new String[]{"geo:lon",Geo.Long.getURIref()}),
- lat(new String[]{Geo.Lat.getURIref()});
+ lon(new String[]{"geo:lon", Geo.Long.getURIref()}),
+ lat(new String[]{"geo:lat", Geo.Lat.getURIref()});
//point("gml:pos,georss:point,coordinates");
private Set<String> keys;
@@ -70,6 +70,7 @@ public class RSSMessage implements Hit, Comparable<RSSMessage>, Comparator<RSSMe
private Token(final String[] keylist) {
this.keys = new HashSet<String>();
this.keys.addAll(Arrays.asList(keylist));
+ this.keys.add(this.name());
}
public String valueFrom(final Map<String, String> map, final String dflt) {
@@ -262,7 +263,7 @@ public class RSSMessage implements Hit, Comparable<RSSMessage>, Comparator<RSSMe
@Override
public double getLon() {
- return Double.parseDouble(Token.lon.valueFrom(this.map, "0.0"));
+ return Double.parseDouble(Token.lat.valueFrom(this.map, "0.0"));
}
@Override
diff --git a/source/net/yacy/search/schema/CollectionConfiguration.java b/source/net/yacy/search/schema/CollectionConfiguration.java
index 7662ed9a2..f7f260f2a 100644
--- a/source/net/yacy/search/schema/CollectionConfiguration.java
+++ b/source/net/yacy/search/schema/CollectionConfiguration.java
@@ -299,7 +299,10 @@ public class CollectionConfiguration extends SchemaConfiguration implements Seri
// coordinates
if (md.lat() != 0.0 && md.lon() != 0.0) {
- if (allAttr || contains(CollectionSchema.coordinate_p)) add(doc, CollectionSchema.coordinate_p, Double.toString(md.lat()) + "," + Double.toString(md.lon()));
+ // i.e. from <meta name="geo.position" content="50.78;11.52" /> or <meta name="ICBM" content="52.50695, 13.328348">
+ if (allAttr || contains(CollectionSchema.coordinate_p)) {
+ add(doc, CollectionSchema.coordinate_p, Double.toString(md.lat()) + "," + Double.toString(md.lon()));
+ }
}
if (allAttr || contains(CollectionSchema.httpstatus_i)) add(doc, CollectionSchema.httpstatus_i, 200);