修改线上null
This commit is contained in:
@@ -24,10 +24,9 @@ def find_around_price(city_now, lng, lat):
|
|||||||
"""
|
"""
|
||||||
if pd.isna(lng):
|
if pd.isna(lng):
|
||||||
return None
|
return None
|
||||||
filter_query = []
|
filter_query = [{"terms": {"tag": ["美食;中餐厅", "美食;外国餐厅"]}}]
|
||||||
if pd.notna(city_now):
|
if pd.notna(city_now):
|
||||||
filter_query.append({"term": {"city": {"value": city_now}}})
|
filter_query.append({"term": {"city": {"value": city_now}}})
|
||||||
filter_query.append({"terms": {"tag": ["美食;中餐厅", "美食;外国餐厅"]}})
|
|
||||||
filter_query.append({"range": {"price": {"gte": 10, "lte": 300}}})
|
filter_query.append({"range": {"price": {"gte": 10, "lte": 300}}})
|
||||||
filter_query.append({"geo_distance": {"distance": 1000, "location": [lng, lat]}})
|
filter_query.append({"geo_distance": {"distance": 1000, "location": [lng, lat]}})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user