On Wed, Jul 04, 2007 at 10:59:46AM +0400, Oleg Bartunov wrote: > On Wed, 4 Jul 2007, Joshua N Pritikin wrote: > >1. What is the advantage of the tsearch2() trigger? Why can't I write my > >own trigger which does approximately: > > no advantage, it's just an example. Please mention that in the documentation: tsearch2() trigger used to automatically update vector_column_name, my_filter_name is the function name to preprocess text_column_name. There are can be many functions and text columns specified in tsearch2() trigger. The following rule used: function applied to all subsequent text columns until next function occurs. Example, function dropatsymbol replaces all entries of @ sign by space. tsearch2() is an example. You are welcome to write your own trigger. > >2. Is there a way to know in advance the maximum return value of the > >rank function? I have lots of other information to include in the > >goodness-of-match score besides the fulltext match rank so I would > >prefer a tsearch2 rank score between 0 and 1. Do I need to write my own > >rank function? > > what's about simple normalization formulae, like rank/(rank+1) ? I think you are suggesting that I use the best rank as the denominator for the rank column. Yes, I suppose that will work. Thanks. -- Make April 15 just another day, visit http://fairtax.org