Creating GiST Indices?

Поиск
Список
Период
Сортировка
От J Smith
Тема Creating GiST Indices?
Дата
Msg-id aieqkk$ra0$1@news.hub.org
обсуждение исходный текст
Ответы Re: Creating GiST Indices?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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


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

Предыдущее
От: "scott.marlowe"
Дата:
Сообщение: Re: How i can empty the buffers of a db
Следующее
От: Andrew Sullivan
Дата:
Сообщение: Re: Questions regarding contrib/tsearch