Re: tsearch in core patch, for inclusion

From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: Neil Conway <neilc(at)samurai(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: tsearch in core patch, for inclusion
Date: 2007-01-25 16:49:12
Message-ID: 45B8DF88.9060705@sigaev.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

> though that we still have the more odd grammar of actually using Tsearch
> to query. Although I don't really have a better suggestion without
> adding some ungodly obscure operator.

IMHO, best possible solution is 'WHERE table.text_field @ text'.
Operator @ internally makes equivalent of 'to_tsvector(table.text_field) @@
plainto_tsquery(text)', it's also possible to add GIN/GIST opclasses to speedup
search queries. Performance of making headline in this case will be decreased
insignificant, but ranking time will be disastrous. Because of reparsing of
whole found texts. GIST performance may be decreased too - GIST indexing of
tsvector is lossy.

--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2007-01-25 16:55:16 Re: Proposal: allow installation of any contrib module
Previous Message Simon Riggs 2007-01-25 16:46:15 Re: WAL Record Header Size Reduction

Browse pgsql-patches by date

  From Date Subject
Next Message Stefan Kaltenbrunner 2007-01-25 16:57:43 Re: guid/uuid datatype
Previous Message Neil Conway 2007-01-25 16:48:23 Re: guid/uuid datatype