[GENERAL] How to do a full-text search words within some proximity of each other?

2012-09-24 Thread W. Matthew Wilson
I noticed in elastic search (ES), you can do queries like

a b~4

I think this query will match stuff like a b and a x x b but not
something like a x x x x x x x x b.

I'm not sure if this kind of thing is possible with postgresql full
text search.   Is it possible?

I understand that I can do a query and rank the results by how closely
the words are to each other, but I want to exclude any matches where
the words are not within two words of each other.

Thanks in advance!

Matt

-- 
W. Matthew Wilson
m...@tplus1.com
http://tplus1.com


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] How to do a full-text search words within some proximity of each other?

2012-09-24 Thread Oleg Bartunov

something like this ?

http://www.sai.msu.su/~megera/wiki/2009-08-12
http://www.sai.msu.su/~megera/postgres/talks/algebra-fts.pdf

Unfortunately, we get no support for this work, so we stop maintaining 
phrase-search patch. I even thinking about kikstarter.com to get money

for this project :)

Oleg
On Mon, 24 Sep 2012, W. Matthew Wilson wrote:


I noticed in elastic search (ES), you can do queries like

   a b~4

I think this query will match stuff like a b and a x x b but not
something like a x x x x x x x x b.

I'm not sure if this kind of thing is possible with postgresql full
text search.   Is it possible?

I understand that I can do a query and rank the results by how closely
the words are to each other, but I want to exclude any matches where
the words are not within two words of each other.

Thanks in advance!

Matt




Regards,
Oleg
_
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: o...@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general