Re: tsearch2: plainto_tsquery() with OR?

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: cluster <skrald(at)amossen(dot)dk>, pgsql-general(at)postgresql(dot)org
Subject: Re: tsearch2: plainto_tsquery() with OR?
Date: 2007-08-09 06:02:20
Message-ID: Pine.LNX.4.64.0708090954480.18739@sn.sai.msu.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 9 Aug 2007, Tom Lane wrote:

> Oleg Bartunov <oleg(at)sai(dot)msu(dot)su> writes:
>> On Thu, 9 Aug 2007, Tom Lane wrote:
>>> Are either of these definitions really right? If I type "foo bar baz"
>>> into Google, for instance, it seems to produce some sort of weighted
>>> result, neither a strict AND nor a strict OR. Google didn't get where
>>> they are by misjudging what the simplest search behavior should be like.
>
>> we provide strict basic query language via to_tsquery(), which could be
>> a foundation for different ql. We need consensus here and we leave it for
>> future.
>
> Since we're about to push tsearch into core, I'm not very happy with a
> "leave it to the future" approach. We need to get the API right *now*.

API is available right now - to_tsquery realized it. You asked about
google-like API, which I dont' know exact description,
" neither a strict AND nor a strict OR" is not a good foundation for
database text search API.
We intentionally realized strict programming-like query language, since
in database search we need sort of exhaustive search, not just first
1000 results in some intuitive order, depending on the day of week
(do you know google is best at sunday night :).

>
> I think that a function defined as "take these words and do an
> appropriate weighted search with them" doesn't necessarily have to
> specify what the weighting is. But if the definition is "find the AND
> of these words", you can't fudge that later on.

What do you mean "appropriate weighted search" ? Does it mean just
use AND by default ?
Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru)
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-08-09 06:14:46 Re: tsearch2: plainto_tsquery() with OR?
Previous Message Tom Lane 2007-08-09 05:42:24 Re: tsearch2: plainto_tsquery() with OR?