mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-12-26 14:36:23 +03:00
fix application of label to wrong expression
This commit is contained in:
parent
96e5a23727
commit
0a8e8cec0f
@ -638,7 +638,7 @@ class PlaceSearch(AbstractSearch):
|
|||||||
else:
|
else:
|
||||||
sql = sql.where(tsearch.c.centroid.ST_DWithin_no_index(NEAR_PARAM,
|
sql = sql.where(tsearch.c.centroid.ST_DWithin_no_index(NEAR_PARAM,
|
||||||
NEAR_RADIUS_PARAM))
|
NEAR_RADIUS_PARAM))
|
||||||
sql = sql.add_columns(-tsearch.c.centroid.ST_Distance(NEAR_PARAM)
|
sql = sql.add_columns((-tsearch.c.centroid.ST_Distance(NEAR_PARAM))
|
||||||
.label('importance'))
|
.label('importance'))
|
||||||
sql = sql.order_by(sa.desc(sa.text('importance')))
|
sql = sql.order_by(sa.desc(sa.text('importance')))
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user