mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-11-24 06:22:08 +03:00
remove use of is_in terms for address computation
The code has been dead for a long time because all is_in terms have been added to the nameaddress_vector so that the IF condition would never hit.
This commit is contained in:
parent
ee194ab369
commit
1dd401b570
@ -1885,40 +1885,6 @@ RAISE WARNING 'Address found % -> %', addr_item.key, addr_item.value;
|
|||||||
END LOOP;
|
END LOOP;
|
||||||
--DEBUG: RAISE WARNING 'address computed';
|
--DEBUG: RAISE WARNING 'address computed';
|
||||||
|
|
||||||
-- try using the isin value to find parent places
|
|
||||||
IF array_upper(isin_tokens, 1) IS NOT NULL THEN
|
|
||||||
FOR i IN 1..array_upper(isin_tokens, 1) LOOP
|
|
||||||
--RAISE WARNING ' getNearestNamedFeature: % % % %',NEW.partition, place_centroid, search_maxrank, isin_tokens[i];
|
|
||||||
IF NOT ARRAY[isin_tokens[i]] <@ nameaddress_vector THEN
|
|
||||||
|
|
||||||
FOR location IN SELECT * from getNearestNamedFeature(NEW.partition, place_centroid, search_maxrank, isin_tokens[i]) LOOP
|
|
||||||
|
|
||||||
--RAISE WARNING ' ISIN: %',location;
|
|
||||||
|
|
||||||
IF location.rank_search > 4 THEN
|
|
||||||
nameaddress_vector := array_merge(nameaddress_vector, location.keywords::integer[]);
|
|
||||||
INSERT INTO place_addressline (place_id, address_place_id, fromarea, isaddress, distance, cached_rank_address)
|
|
||||||
VALUES (NEW.place_id, location.place_id, false, NOT address_havelevel[location.rank_address], location.distance, location.rank_address);
|
|
||||||
IF NEW.postcode is null AND location.postcode is not null
|
|
||||||
AND NOT address_havelevel[location.rank_address] THEN
|
|
||||||
NEW.postcode := location.postcode;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
address_havelevel[location.rank_address] := true;
|
|
||||||
|
|
||||||
IF location.rank_address > parent_place_id_rank THEN
|
|
||||||
NEW.parent_place_id = location.place_id;
|
|
||||||
parent_place_id_rank = location.rank_address;
|
|
||||||
END IF;
|
|
||||||
END IF;
|
|
||||||
END LOOP;
|
|
||||||
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
END LOOP;
|
|
||||||
END IF;
|
|
||||||
--DEBUG: RAISE WARNING 'isin tokens processed';
|
|
||||||
|
|
||||||
-- for long ways we should add search terms for the entire length
|
-- for long ways we should add search terms for the entire length
|
||||||
IF st_length(NEW.geometry) > 0.05 THEN
|
IF st_length(NEW.geometry) > 0.05 THEN
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user