Re: select exact term - Mailing list pgsql-admin

From Sergey Konoplev
Subject Re: select exact term
Date
Msg-id CAL_0b1vHCYCjL0HwidZe99FYWsmObi8R7TKLqmy881DGHo4DVQ@mail.gmail.com
Whole thread Raw
In response to select exact term  (Marc Fromm <Marc.Fromm@wwu.edu>)
List pgsql-admin
On Thu, Mar 28, 2013 at 10:51 AM, Marc Fromm <Marc.Fromm@wwu.edu> wrote:
> Is there a way to create a select statement that will select a record if the
> exact term is found in a field that contains the text to describe something?

In addition to what has been suggested before you may find interesting
full text search abilities
http://www.postgresql.org/docs/9.2/static/textsearch.html. It allows
to do more complex searches like this:

SELECT title, ts_rank_cd(textsearch, query) AS rank
FROM apod, to_tsquery('neutrino|(dark & matter)') query
WHERE query @@ textsearch
ORDER BY rank DESC
LIMIT 10;

--
Kind regards,
Sergey Konoplev
Database and Software Consultant

Profile: http://www.linkedin.com/in/grayhemp
Phone: USA +1 (415) 867-9984, Russia +7 (901) 903-0499, +7 (988) 888-1979
Skype: gray-hemp
Jabber: gray.ru@gmail.com


pgsql-admin by date:

Previous
From: Marc Fromm
Date:
Subject: Re: select exact term
Next
From: Rural Hunter
Date:
Subject: Grant tables cascade to sequence?