[GENERAL] tsearch strategy for incremental search

2008-06-29 Thread Pierre Thibaudeau
I am trying to implement an incremental search engine. The service should start searching when the user has typed at least 3 characters. I am thinking of using the following strategy: a) Create a function string_to_three_char_tsvector(str text) that would generate the tsvector composed of the thr

Re: [GENERAL] tsearch strategy for incremental search

2008-06-29 Thread Pierre Thibaudeau
2008/6/30 Oleg Bartunov <[EMAIL PROTECTED]>: > tsearch will have prefix search support in 8.4. Thanks Oleg! That's fantastic news! In the meantime, carrying on with my earlier idea, here's the little function I came up with for extracting the 3-char-lexeme tsvector, in case anyone's interested:

Re: [GENERAL] tsearch strategy for incremental search

2008-06-29 Thread Oleg Bartunov
Pierre, you, probably, can use custom configuration, which uses pg_3chars dictionary. Oleg On Mon, 30 Jun 2008, Pierre Thibaudeau wrote: 2008/6/30 Oleg Bartunov <[EMAIL PROTECTED]>: tsearch will have prefix search support in 8.4. Thanks Oleg! That's fantastic news! In the meantime, carryi

Re: [GENERAL] tsearch strategy for incremental search

2008-06-30 Thread Pierre Thibaudeau
2008/6/30 Oleg Bartunov <[EMAIL PROTECTED]>: > you, probably, can use custom configuration, which uses pg_3chars > dictionary. Thanks Oleg. That sounds like a cleverer (and more natural) idea than mine. I am intrigued: is "pg_3chars" something that's part of the current distribution of postgres

Re: [GENERAL] tsearch strategy for incremental search

2008-06-30 Thread Oleg Bartunov
On Mon, 30 Jun 2008, Pierre Thibaudeau wrote: 2008/6/30 Oleg Bartunov <[EMAIL PROTECTED]>: you, probably, can use custom configuration, which uses pg_3chars dictionary. Thanks Oleg. That sounds like a cleverer (and more natural) idea than mine. I am intrigued: is "pg_3chars" something that