Re: Simplifying Text Search

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Simplifying Text Search
Date: 2007-11-12 20:59:40
Message-ID: 4738BEBC.2000400@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Simon Riggs wrote:
> On Mon, 2007-11-12 at 20:17 +0000, Heikki Linnakangas wrote:
>
>> Granted, @@ is a bit awkward until you get used to it. "x LIKE y" would
>> read out better, but unfortunately that's already taken ;-).
>
> Remember, I'm not suggesting we get rid of @@
>
>> In any case, it's way too late.
>
> I'm suggesting we add a couple of simple SQL functions that will help
> text search docs be more easily understood.
>
> It's beta and its valid to respond to usability issues just as we would
> respond to code bugs. Otherwise, why have beta? Late, but not too late.
>
> SQLServer, Oracle and MySQL all use functions, not operators. My
> observation would be that we have the hardest and most difficult to
> understand full text search capability. The Contains() function seems
> like a better name than I gave earlier also.
>
> I love what we've done; I just want more people be able to use it.

Hmmm, my choices are:

SELECT 'a fat cat sat on a mat and ate a fat rat'::tsvector @@ 'cat &
rat'::tsquery;

Or:

SELECT ts_match('a fat cat sat on a mat and ate a fat rat','cat & rat');

This seems a little too much like the "duh" department to ignore. A set
of SQL functions would certainly be appropriate here.

Sincerely,

Joshua D. Drake

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2007-11-12 21:03:11 Re: Simplifying Text Search
Previous Message Pavel Stehule 2007-11-12 20:59:17 Re: Simplifying Text Search