Why not keeping positions in GIN?

From: "Hitoshi Harada" <hitoshi_harada(at)forcia(dot)com>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Why not keeping positions in GIN?
Date: 2007-05-25 05:11:24
Message-ID: 00f701c79e8b$23d31fb0$5f01a8c0@daraha
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I was walking through GIN am source code these days, and found that it has
only posting lists but no positions related those.

The reason I was doing that is, to try to implement n-gram text search index
on GIN for myself. As you know Japanese is not like English or other
European languages. If you write Japanese (or other 'not separated') text
index by n-gram, it should have entry positions on the entry as well as the
posting lists, because you must know if each split query key are joined with
each other in the data. To know this, position must be there.

It's not only about Japanese. When you search "phrase" for text in English,
the same logic above will be needed. I don't research about tsearch2 but is
there any problem?? Also, in some case int-array inverted index needs the
entry positions as well, I guess. Obtaining positions with posting lists is
"general" enough for GIN, isn't it?

Is there any future plan around it?

Regards,

Hitoshi Harada

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message mark 2007-05-25 05:20:16 Re: like/ilike improvements
Previous Message Andrew Dunstan 2007-05-25 03:34:13 Re: like/ilike improvements