mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
order near searches by distance instead of importance
This commit is contained in:
@@ -134,7 +134,10 @@ class ForwardGeocoder:
|
||||
return
|
||||
|
||||
for result in results:
|
||||
if not result.display_name:
|
||||
# Negative importance indicates ordering by distance, which is
|
||||
# more important than word matching.
|
||||
if not result.display_name\
|
||||
or (result.importance is not None and result.importance < 0):
|
||||
continue
|
||||
distance = 0.0
|
||||
norm = self.query_analyzer.normalize_text(result.display_name)
|
||||
|
||||
Reference in New Issue
Block a user