Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

include zip codes for addresses linked to the street in the address s…

…earch terms
  • Loading branch information...
commit 7d250895a58a4a5c303c538847d28d6cdd8dc798 1 parent d1a224b
@twain47 authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 sql/functions.sql
View
10 sql/functions.sql
@@ -1709,6 +1709,16 @@ BEGIN
END LOOP;
END IF;
END IF;
+
+ -- for the USA we have an additional address table. Merge in zip codes from there too
+ IF NEW.rank_search = 26 AND NEW.calculated_country_code = 'us' THEN
+ FOR location IN SELECT distinct postcode from location_property_tiger where parent_place_id = NEW.place_id LOOP
+ address_street_word_id := get_name_id(make_standard_name(location.postcode));
+ nameaddress_vector := array_merge(nameaddress_vector, ARRAY[address_street_word_id]);
+ isin_tokens := isin_tokens || address_street_word_id;
+ END LOOP;
+ END IF;
+
-- RAISE WARNING 'ISIN: %', isin_tokens;
-- Process area matches
Please sign in to comment.
Something went wrong with that request. Please try again.