merge addr:postcode from houses into search index of attached road

Makes house number searchable by postcode when the postcode is
only available in addr:postcode.
This commit is contained in:
Sarah Hoffmann
2015-05-08 19:34:33 +02:00
parent 4ba93dcb50
commit 2f8a29ba39
2 changed files with 34 additions and 0 deletions

View File

@@ -26,3 +26,17 @@ Feature: Creation of search terms
Then search_name table contains
| place_id | name_vector | nameaddress_vector
| N1 | foo | the road
Scenario: Roads take over the postcode from attached houses
Given the scene roads-with-pois
And the place nodes
| osm_id | class | type | housenumber | postcode | street | geometry
| 1 | place | house | 1 | 12345 | North St |:p-S1
And the place ways
| osm_id | class | type | name | geometry
| 1 | highway | residential | North St | :w-north
When importing
Then search_name table contains
| place_id | nameaddress_vector
| W1 | 12345