also switch legacy tokenizer to new street/place choice behaviour

This commit is contained in:
Sarah Hoffmann
2023-06-30 15:28:00 +02:00
parent 6c5589c9d2
commit d7a3039c2a
3 changed files with 6 additions and 7 deletions

View File

@@ -44,14 +44,14 @@ $$ LANGUAGE SQL IMMUTABLE STRICT;
CREATE OR REPLACE FUNCTION token_is_street_address(info JSONB)
RETURNS BOOLEAN
AS $$
SELECT info->>'street' is not null or info->>'place' is null;
SELECT info->>'street' is not null or info->>'place_search' is null;
$$ LANGUAGE SQL IMMUTABLE;
CREATE OR REPLACE FUNCTION token_has_addr_street(info JSONB)
RETURNS BOOLEAN
AS $$
SELECT info->>'street' is not null;
SELECT info->>'street' is not null and info->>'street' != '{}';
$$ LANGUAGE SQL IMMUTABLE;