mysql - Finding words that are close together with PostgreSQL -


is there way find words appear close postgresql. know mysql supports innodb tables when using proximity search.

example:

select quote "too far apart"  quotes match(quote) against ('"early wise" @20' in boolean mode); 

ts_rank_cd provides different value depending on how far apart terms are.

select     ts_rank_cd(          to_tsvector('simple', 'the quick brown fox'),          plainto_tsquery('simple', 'the fox')      ) first,     ts_rank_cd(          to_tsvector('simple', 'the quick brown fox'),          plainto_tsquery('simple', 'quick brown')      ) second; 

output:

first       second 0.0333333   0.1 

0.1 / ts_rank_cd seems give actual distance between words


Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

html - Outlook 2010 Anchor (url/address/link) -

android - How to create dynamically Fragment pager adapter -