crude id and phone protection
gitea/wcs/pipeline/head There was a failure building this commit
Details
gitea/wcs/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
11f0998225
commit
8bf2e33553
|
@ -1716,7 +1716,12 @@ def init_search_tokens(conn=None, cur=None):
|
|||
AS $function$
|
||||
with
|
||||
tokenized as (select unnest(regexp_split_to_array($1, '\s+')) w),
|
||||
super_tokenized as (select w, coalesce(tsquery_agg_or(plainto_tsquery(token) order by token <-> w desc), plainto_tsquery(w)) tokens from tokenized left join wcs_search_tokens on token % w group by w)
|
||||
super_tokenized as (
|
||||
select w,
|
||||
coalesce(tsquery_agg_or(plainto_tsquery(token) order by token <-> w desc), plainto_tsquery(w)) tokens
|
||||
from tokenized
|
||||
left join wcs_search_tokens on token % w and w not similar to '%[0-9]{2,}%'
|
||||
group by w)
|
||||
select tsquery_agg_and(tokens) from super_tokenized;
|
||||
$function$;""")
|
||||
|
||||
|
|
Loading…
Reference in New Issue