forked from hans/Nominatim
differentiate between place searches with and without address
This commit is contained in:
@@ -20,7 +20,7 @@ APIOPTIONS = ['search']
|
||||
|
||||
|
||||
def run_search(apiobj, frontend, global_penalty, lookup, ranking, count=2,
|
||||
hnrs=[], pcs=[], ccodes=[], quals=[],
|
||||
hnrs=[], pcs=[], ccodes=[], quals=[], has_address=False,
|
||||
details=SearchDetails()):
|
||||
class MySearchData:
|
||||
penalty = global_penalty
|
||||
@@ -31,7 +31,7 @@ def run_search(apiobj, frontend, global_penalty, lookup, ranking, count=2,
|
||||
lookups = lookup
|
||||
rankings = ranking
|
||||
|
||||
search = AddressSearch(0.0, MySearchData(), count)
|
||||
search = AddressSearch(0.0, MySearchData(), count, has_address)
|
||||
|
||||
if frontend is None:
|
||||
api = apiobj
|
||||
|
||||
@@ -32,7 +32,7 @@ def run_search(apiobj, frontend, global_penalty, cat, cat_penalty=None, ccodes=[
|
||||
if ccodes is not None:
|
||||
details.countries = ccodes
|
||||
|
||||
place_search = PlaceSearch(0.0, PlaceSearchData(), 2)
|
||||
place_search = PlaceSearch(0.0, PlaceSearchData(), 2, False)
|
||||
|
||||
if cat_penalty is None:
|
||||
cat_penalty = [0.0] * len(cat)
|
||||
|
||||
@@ -22,7 +22,7 @@ APIOPTIONS = ['search']
|
||||
|
||||
|
||||
def run_search(apiobj, frontend, global_penalty, lookup, ranking, count=2,
|
||||
pcs=[], ccodes=[], quals=[],
|
||||
pcs=[], ccodes=[], quals=[], has_address=False,
|
||||
details=SearchDetails()):
|
||||
class MySearchData:
|
||||
penalty = global_penalty
|
||||
@@ -33,7 +33,7 @@ def run_search(apiobj, frontend, global_penalty, lookup, ranking, count=2,
|
||||
rankings = ranking
|
||||
housenumbers = None
|
||||
|
||||
search = PlaceSearch(0.0, MySearchData(), count)
|
||||
search = PlaceSearch(0.0, MySearchData(), count, has_address)
|
||||
|
||||
if frontend is None:
|
||||
api = apiobj
|
||||
|
||||
Reference in New Issue
Block a user