mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-03-11 05:14:07 +00:00
unlisted place names need to go into the address
Housenumbers with unlisted place names should be handled like any ither housenumbers with missing address terms.
This commit is contained in:
@@ -481,24 +481,20 @@ BEGIN
|
|||||||
name_vector := array_merge(name_vector, hnr_vector);
|
name_vector := array_merge(name_vector, hnr_vector);
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
IF is_place_addr THEN
|
|
||||||
addr_place_ids := token_addr_place_search_tokens(token_info);
|
|
||||||
IF not addr_place_ids <@ parent_name_vector THEN
|
|
||||||
-- make sure addr:place terms are always searchable
|
|
||||||
nameaddress_vector := array_merge(nameaddress_vector, addr_place_ids);
|
|
||||||
-- If there is a housenumber, also add the place name as a name,
|
|
||||||
-- so we can search it by the usual housenumber+place algorithms.
|
|
||||||
IF hnr_vector is not null THEN
|
|
||||||
name_vector := array_merge(name_vector, addr_place_ids);
|
|
||||||
END IF;
|
|
||||||
END IF;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
-- Cheating here by not recomputing all terms but simply using the ones
|
-- Cheating here by not recomputing all terms but simply using the ones
|
||||||
-- from the parent object.
|
-- from the parent object.
|
||||||
nameaddress_vector := array_merge(nameaddress_vector, parent_name_vector);
|
nameaddress_vector := array_merge(nameaddress_vector, parent_name_vector);
|
||||||
nameaddress_vector := array_merge(nameaddress_vector, parent_address_vector);
|
nameaddress_vector := array_merge(nameaddress_vector, parent_address_vector);
|
||||||
|
|
||||||
|
-- make sure addr:place terms are always searchable
|
||||||
|
IF is_place_addr THEN
|
||||||
|
addr_place_ids := token_addr_place_search_tokens(token_info);
|
||||||
|
IF hnr_vector is not null AND not addr_place_ids <@ parent_name_vector
|
||||||
|
THEN
|
||||||
|
name_vector := array_merge(name_vector, hnr_vector);
|
||||||
|
END IF;
|
||||||
|
nameaddress_vector := array_merge(nameaddress_vector, addr_place_ids);
|
||||||
|
END IF;
|
||||||
END;
|
END;
|
||||||
$$
|
$$
|
||||||
LANGUAGE plpgsql;
|
LANGUAGE plpgsql;
|
||||||
|
|||||||
Reference in New Issue
Block a user