Re: tsearch2, gin and @@@ operator?

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Jean-Paul Argudo <jean-paul(at)argudo(dot)org>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: tsearch2, gin and @@@ operator?
Date: 2007-08-30 17:04:29
Message-ID: Pine.LNX.4.64.0708302103220.2767@sn.sai.msu.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 30 Aug 2007, Jean-Paul Argudo wrote:

> Hi all,
>
>
> I cant find in the docs about tsearch2 (nor the Oleg&Teodor's wiki) when
> to use @@@ instead of @@.

it's written here
http://www.sai.msu.su/~megera/postgres/fts/doc/indexes-fts.html

>
> @@ works in GIST, even with 'lexeme:a' (:a, :bc, etc.. every combination
> of a,b,c & d part)
>
> @@ doesnt with GIN in the same queries it, PostgreSQL says:
>
> ERREUR: With class of lexeme restrictions use @@@ operation
>
> I added a RAISE NOTICE as I can give you the query, generated from a
> plpgsql function:
>
> INFO: There was an error running this query:
>
> select d.id, q
> from documents_gin d,
> to_tsquery('default_french', convert('chef:d', 'LATIN9')) q
> where
> gin_vector @@ q;
>
> So, I have to use @@@ there instead of @@ to have the query working.
>
> Now, I don't know when to use @@ or @@@.
>
> Can I use always @@@ instead of @@ when its about a GIN based search?
>
> If can use always @@@, is it less performant than @@ in some cases?
>
> Please let me know when to use @@ or @@@ if I may not use allways @@@ in
> those case, as I can tweak my plpgsql function.
>
>
> Thanks a lot,
>
>

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

Browse pgsql-hackers by date

  From Date Subject
Next Message Merlin Moncure 2007-08-30 17:13:17 enum types and binary queries
Previous Message Oleg Bartunov 2007-08-30 17:03:00 Re: Why is there a tsquery data type?