mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-15 02:47:59 +00:00
use information from tokenizer to determine street vs. place address
So far the SQL logic used the information from the address field to determine if an address is attached to a street or place. This changes the logic to use the information provided in the token_info. This allows sanitizers to enforce a certain parenting without changing the visible address information.
This commit is contained in:
@@ -523,7 +523,7 @@ class TestPlaceAddress:
|
||||
def test_process_place_nonexisting_street(self):
|
||||
info = self.process_address(street='Grand Road')
|
||||
|
||||
assert 'street' not in info
|
||||
assert info['street'] == '{}'
|
||||
|
||||
|
||||
def test_process_place_multiple_street_tags(self):
|
||||
@@ -538,7 +538,7 @@ class TestPlaceAddress:
|
||||
def test_process_place_street_empty(self):
|
||||
info = self.process_address(street='🜵')
|
||||
|
||||
assert 'street' not in info
|
||||
assert info['street'] == '{}'
|
||||
|
||||
|
||||
def test_process_place_street_from_cache(self):
|
||||
|
||||
Reference in New Issue
Block a user