Creating GiST Indices?

From: J Smith <dark_panda(at)hushmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Creating GiST Indices?
Date: 2002-08-02 20:39:01
Message-ID: aieqkk$ra0$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


I've been playing around with creating (or rather, attempting to create)
GiST indices. I've looked high and low for information on how this sort of
thing is done, and I'm at the end of my rope.

Here's basically what I've been using as a test:

testdb=# create table test (
testdb-# id serial primary key,
testdb-# sometext text not null
testdb-# );
...
testdb=# insert into test (sometext) values ('blah');
testdb=# insert into test (sometext) values ('whatever');
testdb=# insert into test (sometext) values ('filling up space');
...
testdb=# create index my_index on test using gist (sometext);
ERROR: data type text has no default operator class for access method
"gist" You must specify an class for the index or define a default operator
class for the data type

So I've tried stuff like this, based on various things I've read about GiST
in PgSQL:

testdb=# create index my_index on test using gist (sometext gist_text_ops);
ERROR: DefineIndex: operator class "gist_text_ops" not support by access
method "gist"

This basically went on for hours. I've tried text_ops based on what I can
see in the pg_class table and a bunch of other stuff, but I can't create
GiST indexes. (Or rather, I don't know how to.)

What should I be doing instead? I've looked at OpenFTS, contrib/tsearch, but
I'm no closer to getting it working.

Any pointers?

Thx.

J

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Sullivan 2002-08-02 20:58:39 Re: Questions regarding contrib/tsearch
Previous Message Tom Lane 2002-08-02 20:25:06 Re: getpid() function