select * from table where contains(field, 'text string', 10) > 1 order by
score(10);
Contains returns a number based on an evaluation of the 'text string' against
the field. If the field has the words contained in 'text string' in it, it
returns a number based on some default assumptions. The assumptions are
things like points for the first occurrence of a word, and next occurrence of
the word. Points for words in the right order as specified in 'text string',
etc.
Who do I contact at greatbridge?
Joel Burton wrote:
> Why not start a new project at greatbridge.org?
>
> I'd be happy to see metaphone() move in there, soundex() would make
> sense. I have a hashing algorithm that grabs the first letter off of
> words, except for user-definable 'stop words', which we use to look for
> likely organization name matches.
>
> These could all fall under a project of PG string functions.
>
> I think, as little things in contrib/, it's easy for people to miss
> these. With a project page, some discussion, etc. (& a place in contrib/),
> more people would be able to use these.
>
> PG functions are one of the things that separates PG from MySQL (which has
> only C UDFs, and IIRC, not on some platforms) and InterBase (which has
> plsql-like procedures, but functions can only be written in C). I think
> our functions are one of our strongest cases, and the more we can show
> people examples of how to use them, and the larger our useful library, the
> more we win.
>
> P.S. What exactly does contains() do?
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html