Peter Eisentraut <[EMAIL PROTECTED]> writes:
> Am Mittwoch, 14. November 2007 schrieb Trevor Talbot:
>> But that coversion itself is fundamentally flawed, is the problem.

> I know it's incorrect, but with a different parser and/or dictionary you 
> could 
> make it work.

No, I don't think so.  Trevor's killer point is that the token
boundaries chosen by the parser --- no matter *what* they are ---
might not line up with the substrings needed by a given LIKE pattern.
There isn't any mechanism in tsearch that will find the stored word
"foobar" if the search is for "foo" & "bar"; nor vice versa.

It might be possible to use a pg_trgm index in this way, since
AFAICT from the documents pg_trgm just chops up the substrings
blindly rather than trying to have smarts about word boundaries.

(And on third thought, I suppose you could emulate pg_tgrm with
a suitable parser and a lobotomized dictionary ... but it would
be pretty wasteful to use the tsearch mechanisms for that.)

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to