Re: [PATCHES] Partial match in GIN (next vesrion)

2008-05-16 Thread Teodor Sigaev
There seems to be something broken here: it's acting like prefix search is on all the time, eg I'm in sackcloth and ashes... Fixed and extended regression tests. http://www.sigaev.ru/misc/tsearch_prefix-0.9.gz -- Teodor Sigaev E-mail: [EMAIL PROTECTED]

Re: [PATCHES] Partial match in GIN (next vesrion)

2008-05-16 Thread Tom Lane
Teodor Sigaev [EMAIL PROTECTED] writes: http://www.sigaev.ru/misc/partial_match_gin-0.10.gz http://www.sigaev.ru/misc/tsearch_prefix-0.9.gz http://www.sigaev.ru/misc/wildspeed-0.12.tgz I've applied the first two of these with minor editorialization (mostly fixing documentation). However, I'm

Re: [PATCHES] Partial match in GIN (next vesrion)

2008-05-16 Thread Oleg Bartunov
Wildspeed was designed as an example application of the GIN's partial match and as a useful extension for *short* strings. It's also good standalone demonstration of GIN API. We tried to stay away from full text search, parser, word delimiters and etc. From that point of view it might be

Re: [PATCHES] Partial match in GIN (next vesrion)

2008-05-15 Thread Tom Lane
Teodor Sigaev [EMAIL PROTECTED] writes: Looking at this now. Wouldn't it be a good idea for comparePartial to get the strategy number of the operator? As you have it set up, I doubt that an opclass can support more than one partial-match operator. It might be useful, although I don't see

Re: [PATCHES] Partial match in GIN (next vesrion)

2008-05-15 Thread Teodor Sigaev
It might be useful, although I don't see any usage of that right now. I'll add this option. Ping? I'd like to get this patch out of the way. I'm very sorry for long delay. http://www.sigaev.ru/misc/partial_match_gin-0.10.gz http://www.sigaev.ru/misc/tsearch_prefix-0.8.gz

Re: [PATCHES] Partial match in GIN (next vesrion)

2008-05-15 Thread Tom Lane
Teodor Sigaev [EMAIL PROTECTED] writes: http://www.sigaev.ru/misc/partial_match_gin-0.10.gz http://www.sigaev.ru/misc/tsearch_prefix-0.8.gz http://www.sigaev.ru/misc/wildspeed-0.12.tgz There seems to be something broken here: it's acting like prefix search is on all the time, eg regression=#

Re: [PATCHES] Partial match in GIN (next vesrion)

2008-05-13 Thread Teodor Sigaev
Looking at this now. Wouldn't it be a good idea for comparePartial to get the strategy number of the operator? As you have it set up, I doubt that an opclass can support more than one partial-match operator. It might be useful, although I don't see any usage of that right now. I'll add this

Re: [PATCHES] Partial match in GIN (next vesrion)

2008-05-12 Thread Tom Lane
Teodor Sigaev [EMAIL PROTECTED] writes: http://www.sigaev.ru/misc/partial_match_gin-0.9.gz Sync with CVS. Looking at this now. Wouldn't it be a good idea for comparePartial to get the strategy number of the operator? As you have it set up, I doubt that an opclass can support more than one

Re: [PATCHES] Partial match in GIN (next vesrion)

2008-04-22 Thread Teodor Sigaev
http://www.sigaev.ru/misc/partial_match_gin-0.9.gz Sync with CVS. -- Teodor Sigaev E-mail: [EMAIL PROTECTED] WWW: http://www.sigaev.ru/ -- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To

Re: [PATCHES] Partial match in GIN (next vesrion)

2008-04-15 Thread Teodor Sigaev
http://www.sigaev.ru/misc/partial_match_gin-0.8.gz Reworked interface as it suggested by Gregory (http://archives.postgresql.org/pgsql-patches/2008-04/msg00199.php) and move check of index into expand_indexqual_opclause() as suggested by Heikki

Re: [PATCHES] Partial match in GIN

2008-04-10 Thread Teodor Sigaev
How about forcing the use of a bitmap index scan, and modify the indexam API so that GIN could a return a lossy bitmap, and let the bitmap heap scan do the rechecking? Partial match might be used only for one search entry from many. In sext search example: 'a:* qwertyuiop' - second lexeme

Re: [PATCHES] Partial match in GIN

2008-04-09 Thread Heikki Linnakangas
Alvaro Herrera wrote: Well, LIKE %foo% is supposed to match foo unanchored, but with a btree (or two btrees) you can only get 'foo' anchored to either end of the string (or both). Ah, true. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com -- Sent via pgsql-patches mailing

Re: [PATCHES] Partial match in GIN

2008-04-08 Thread Teodor Sigaev
Looking at the patch, you require that the TIDBitmap fits in work_mem in non-lossy format. I don't think that's acceptable, it can easily exceed work_mem if you search for some very common word. Failing to execute a valid query is not good. But way is better than nothing. In really, that way

Re: [PATCHES] Partial match in GIN

2008-04-08 Thread Gregory Stark
Teodor Sigaev [EMAIL PROTECTED] writes: - compare function has third (optional) argument, of boolean type, it points to kind of compare: partial or exact match. If argument is equal to 'false', function should produce comparing as usual, else function's result is treated as:

Re: [PATCHES] Partial match in GIN

2008-04-08 Thread Heikki Linnakangas
Teodor Sigaev wrote: Looking at the patch, you require that the TIDBitmap fits in work_mem in non-lossy format. I don't think that's acceptable, it can easily exceed work_mem if you search for some very common word. Failing to execute a valid query is not good. But way is better than nothing.

Re: [PATCHES] Partial match in GIN

2008-04-08 Thread Alvaro Herrera
Heikki Linnakangas wrote: Teodor Sigaev wrote: GIN speeds up '%foo%' too - which is impossible for btree. But I don't like a hack around LIKE support in BTree. This support uses outflank ways missing regular one. You could satisfy '%foo%' using a regular and a reverse B-tree index,

Re: [PATCHES] Partial match in GIN

2008-04-08 Thread Heikki Linnakangas
Alvaro Herrera wrote: Heikki Linnakangas wrote: Teodor Sigaev wrote: GIN speeds up '%foo%' too - which is impossible for btree. But I don't like a hack around LIKE support in BTree. This support uses outflank ways missing regular one. You could satisfy '%foo%' using a regular and a

Re: [PATCHES] Partial match in GIN

2008-04-08 Thread Alvaro Herrera
Heikki Linnakangas wrote: Alvaro Herrera wrote: Heikki Linnakangas wrote: You could satisfy '%foo%' using a regular and a reverse B-tree index, and a bitmap AND. Which is interestingly similar to the way you proposed to use a TIDBitmap within GIN. Huh, can you? I can see doing col

Re: [PATCHES] Partial match in GIN

2008-04-05 Thread Heikki Linnakangas
Teodor Sigaev wrote: For each matched entry all corresponding ItemPointers are collected in TIDBitmap structure to effective merge ItemPointers from different entries. Patch introduces following changes in interface: Looking at the patch, you require that the TIDBitmap fits in work_mem in

[PATCHES] Partial match in GIN

2008-04-04 Thread Teodor Sigaev
We (Oleg and me) would like to present patch implements partial match for GIN index and two extensions which use this new feature. We hope that after short review they will be committed to CVS. This work was sponsored by EnterpriseDB. http://www.sigaev.ru/misc/partial_match_gin-0.7.gz