Re: tsearch2 in PostgreSQL 8.3?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: tsearch2 in PostgreSQL 8.3?
Дата
Msg-id 200708181949.l7IJnJ113224@momjian.us
обсуждение исходный текст
Ответ на Re: tsearch2 in PostgreSQL 8.3?  ("Trevor Talbot" <quension@gmail.com>)
Список pgsql-hackers
Trevor Talbot wrote:
> On 8/18/07, Bruce Momjian <bruce@momjian.us> wrote:
> > Trevor Talbot wrote:
> 
> > > Well, you could create a function that returns a tsvector, but how do
> > > you get that to work with queries?  I've been under the impression the
> > > expressions need to match (in the normal case, be the same function
> > > with the same arguments) in order to use the index.
> >
> > Yes, so you create a function called complex_ts and create the index:
> >
> >         CREATE INDEX ii on x USING GIT(complex_ts(col1, col2))
> >
> > and in your WHERE clause you do:
> >
> >         WHERE 'a & b' @@ complex_ts(col1, col2)
> 
> Oh, duh, of course.  I kept thinking of the index as something
> abstract instead of reusing the expression, even when the examples
> were right in front of me...
> 
> 
> On 8/18/07, Joshua D. Drake <jd@commandprompt.com> wrote:
> > Bruce Momjian wrote:
> 
> > >       CREATE INDEX ii on x USING GIT(complex_ts(col1, col2))
> >
> > GIN?
> 
> Freudian slip, that's what he thinks of me :D

Group-Index-Tuples, the patch that was held for 8.4.  :-(

--  Bruce Momjian  <bruce@momjian.us>          http://momjian.us EnterpriseDB
http://www.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: tsearch2 in PostgreSQL 8.3?
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: change name of redirect_stderr?