tsearch thoughts

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: tsearch thoughts
Date: 2002-11-30 23:40:30
Message-ID: 0c6901c298c9$de67fac0$6500a8c0@internal
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Is there any reason why the tseach indexes couldn't be modified to just work
on TEXT fields and not TXTIDX fields. Is there really a reason to have the
TXTIDX type?

I mean, when the index is created over the text column, instead of just
indexing the text as-is, index the txt2txtidx'd version...?

That would vastly reduce the complexity of tsearch, and would make the
indexed text invisible, as it is in most other fti implementations...?

I tried to simulate this myself, although ideally it would be invisible to
the user:

test=# create table test (a text);
CREATE
test=# CREATE INDEX my_idx ON test USING gist(txt2txtidx(a));
ERROR: DefineIndex: index function must be marked iscachable

So the index isn't iscachable - why's that?

Say it was marked iscachable, then I'd be able to query like this:

SELECT * FROM test WHERE txt2txtidx(test) ## 'apple';

This would mean that the index on-disk file would be large, but the table
file would stay small. It would also vastly reduce the size of pg_dumps...

Could we move towards something like:

CREATE FULLTEXT INDEX my_idx ON test (a);

Or something?

Chris

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Kings-Lynne 2002-11-30 23:48:34 Re: Newbie hacker looking to get started
Previous Message ow 2002-11-30 23:39:48 Re: 7.4 Wishlist