Re: text type has no default operator class for GIN?

From: Bob Gobeille <bob(dot)gobeille(at)hp(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Sam Mason <sam(at)samason(dot)me(dot)uk>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: text type has no default operator class for GIN?
Date: 2009-08-19 15:26:14
Message-ID: 052F4271-2B87-49FC-8739-2A8AF5542B53@hp.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Aug 18, 2009, at 6:21 PM, Tom Lane wrote:

> What GIN indexes are good for is indexing equality queries on the
> components of something the database otherwise thinks of as a single
> object. For instance you can GIN-index searches for arrays containing
> a particular value as a member.
>
> Now type text doesn't have any built-in notion of a component, other
> than individual characters, which aren't normally that interesting
> to search for. What I suppose the OP has in mind is full-text
> searching, which is looking for component *words*. But "word" is a
> very language- and context-dependent concept. And defining which
> words
> are to be considered equal for searching purposes is even more so.
> If we'd hard-wired one notion of "word" into datatype text, it
> wouldn't
> be very flexible. The point of the tsvector layer is to have a
> configurable way to extract searchable words from a chunk of text.
> There are also some implementation advantages like not having to
> repeat
> that processing constantly during a search --- but the main point is
> having a place to define what a word is and what search equality
> means.

Yes, I was looking for full text searching in english. Since my
postgresql.conf contained:

default_text_search_config = 'pg_catalog.english'

doesn't this specify the parser, dictionary, and template to use for
full text searching in english? I should have mentioned the above in
my post but since it was in the original conf file (debian install) I
didn't think of it.

Bob Gobeille
bobg(at)fossology(dot)org

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2009-08-19 15:37:38 Re: index "pg_authid_rolname_index" is not a btree
Previous Message Sam Mason 2009-08-19 15:14:54 Re: text type has no default operator class for GIN?