mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
switch housenumber tokens to new word table layout
This commit is contained in:
@@ -140,15 +140,13 @@ CREATE OR REPLACE FUNCTION getorcreate_hnr_id(lookup_term TEXT)
|
||||
DECLARE
|
||||
return_id INTEGER;
|
||||
BEGIN
|
||||
SELECT min(word_id) INTO return_id
|
||||
FROM word
|
||||
WHERE word_token = ' ' || lookup_term
|
||||
and class = 'place' and type = 'house';
|
||||
SELECT min(word_id) INTO return_id FROM word
|
||||
WHERE word_token = lookup_term and type = 'H';
|
||||
|
||||
IF return_id IS NULL THEN
|
||||
return_id := nextval('seq_word');
|
||||
INSERT INTO word (word_id, word_token, class, type, search_name_count)
|
||||
VALUES (return_id, ' ' || lookup_term, 'place', 'house', 0);
|
||||
INSERT INTO word (word_id, word_token, type)
|
||||
VALUES (return_id, lookup_term, 'H');
|
||||
END IF;
|
||||
|
||||
RETURN return_id;
|
||||
|
||||
Reference in New Issue
Block a user