Re: Simplifying Text Search
От | Tom Lane |
---|---|
Тема | Re: Simplifying Text Search |
Дата | |
Msg-id | 2345.1195139621@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Simplifying Text Search (Peter Eisentraut <peter_e@gmx.net>) |
Список | pgsql-hackers |
Peter Eisentraut <peter_e@gmx.net> 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
В списке pgsql-hackers по дате отправления: