tsearch2, gin and @@@ operator? - Mailing list pgsql-hackers

From Jean-Paul Argudo
Subject tsearch2, gin and @@@ operator?
Date
Msg-id 46D6EB8A.2090803@argudo.org
Whole thread Raw
Responses Re: tsearch2, gin and @@@ operator?  (Oleg Bartunov <oleg@sai.msu.su>)
List pgsql-hackers
Hi all,


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

@@ 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,

-- 
Jean-Paul Argudo
www.PostgreSQLFr.org


pgsql-hackers by date:

Previous
From: Gregory Stark
Date:
Subject: Re: Why is there a tsquery data type?
Next
From: Tom Lane
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Fix brain fade in DefineIndex(): it was continuing to access the