2017-07-17 1 views

Répondre

1

Peut-être pas de façon optimale et performante, mais en utilisant match de regex à order by devrait faire ce que vous voulez

with mytable(posttext) as(
select 'a Intelence' union all 
select 'intel someIntelence' union all 
select 'a intel' union all 
select 'a Intelence b' 
) 

select * 
from mytable 
where posttext @@ to_tsquery('Intelence') 
order by posttext ~* '(^|\s)intelence(\s|$)' desc