我pg_trgm
在我的名字列中使用:
create index if not exists idx_gin_iperson_name on iperson using gin (name gin_trgm_ops)
在iperson
表中,我有一列名称Jose Goruir
和查询:
SELECT * FROM iperson p where ((name ilike unaccent('%Jos%'))) limit 3000;
结果还可以,我的意思是它会返回Jose Goruir
,但是使用以下查询:
SELECT * FROM iperson p where ((name ilike unaccent('%Jose%'))) limit 3000;
它不会返回 Jose Goruir
。任何想法?