Re: How to use the full text index feature on PostgreSQL - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: How to use the full text index feature on PostgreSQL
Date
Msg-id 20060811181859.GB13669@alvh.no-ip.org
Whole thread Raw
In response to Re: How to use the full text index feature on PostgreSQL  ("Joshua D. Drake" <jd@commandprompt.com>)
Responses Re: How to use the full text index feature on PostgreSQL  (Chris <dmagick@gmail.com>)
List pgsql-general
Joshua D. Drake wrote:
> Matthew T. O'Connor wrote:
> >Chris wrote:
> >>aBBISh wrote:
> >>You need to install & setup tsearch2.
> >>
> >>I have a small article about how to do that here:
> >>
> >>http://www.designmagick.com/article/27/
> >
> >Also on page 3 you say, "(normal indexes will only index the first 255
> >characters of a 'text' field)."
> >
> >Is that true?
>
> I thought it was the first 8k? There is also an article here:
>
> http://www.devx.com/opensource/Article/21674/1954?pf=true

Neither is true.  If you create an index on a text column, and that
column contains a row above the size limit, an error will result.
There's no mechanism in place to truncate what's indexed in order to
make it fit the maximum index tuple size; you can do it yourself using
an expressional index if you want, of course.

The maximum is a bit above 2kB (assuming 8kB pages), but keep in mind
that some stuff is compressed before being indexed, so the actual data
length may be higher.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

pgsql-general by date:

Previous
From: Michael Meskes
Date:
Subject: Re: Connection string
Next
From: marcelo Cortez
Date:
Subject: table space for temporal tables