drop search_rank column from search_name

This is no longer needed for the initial lookup.
This commit is contained in:
Sarah Hoffmann
2026-03-02 11:32:06 +01:00
parent 46dfb12844
commit 7bbfb4b972
5 changed files with 24 additions and 18 deletions

View File

@@ -1138,10 +1138,10 @@ BEGIN
NEW.token_info, NEW.centroid);
IF array_length(name_vector, 1) is not NULL THEN
INSERT INTO search_name (place_id, search_rank, address_rank,
INSERT INTO search_name (place_id, address_rank,
importance, country_code, name_vector,
nameaddress_vector, centroid)
VALUES (NEW.place_id, NEW.rank_search, NEW.rank_address,
VALUES (NEW.place_id, NEW.rank_address,
NEW.importance, NEW.country_code, name_vector,
nameaddress_vector, NEW.centroid);
{% if debug %}RAISE WARNING 'Place added to search table';{% endif %}
@@ -1311,10 +1311,10 @@ BEGIN
{% if debug %}RAISE WARNING 'added to search name (full)';{% endif %}
{% if not db.reverse_only %}
INSERT INTO search_name (place_id, search_rank, address_rank,
INSERT INTO search_name (place_id, address_rank,
importance, country_code, name_vector,
nameaddress_vector, centroid)
VALUES (NEW.place_id, NEW.rank_search, NEW.rank_address,
VALUES (NEW.place_id, NEW.rank_address,
NEW.importance, NEW.country_code, name_vector,
nameaddress_vector, NEW.centroid);
{% endif %}

View File

@@ -12,7 +12,6 @@ DROP TABLE IF EXISTS search_name;
CREATE TABLE search_name (
place_id BIGINT NOT NULL,
importance FLOAT NOT NULL,
search_rank SMALLINT NOT NULL,
address_rank SMALLINT NOT NULL,
name_vector integer[] NOT NULL,
nameaddress_vector integer[] NOT NULL,