Re: BUG #8354: stripped positions can generate nonzero rank in ts_rank_cd

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: BUG #8354: stripped positions can generate nonzero rank in ts_rank_cd
Дата
Msg-id 20140321221015.GA26056@momjian.us
обсуждение исходный текст
Ответ на Re: BUG #8354: stripped positions can generate nonzero rank in ts_rank_cd  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #8354: stripped positions can generate nonzero rank in ts_rank_cd  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-bugs
On Fri, Mar 21, 2014 at 10:45:18AM -0400, Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > OK, combined patch attached.  Is this correct?  I keep hoping someone
> > else will chime in with an opinion on this, but at this point I think
> > what you have done is clear enough for me to commit for 9.4.
>
> That whole function is seriously undercommented; I suppose it's not this
> patch's charter to fix that, but we could at least write
>
> !                           /* ignore words without positions */
> !                 entry++;
> !                 continue;
>
> The proposed new documentation text seems pretty badly written.  How about
>
> This function requires lexeme positional information to perform its
> calculation.  Therefore it ignores any <quote>stripped</> lexemes in the
> <type>tsvector</>.  If there are no unstripped lexemes in the input, the
> result will be zero.
>
> The parenthetical "See" text is ok.

OK, thanks.  Updated patch attached.  If Alexander Hill would like to
add more C comments to any of the ts*.c files, or docs explaining what
"cover desity" is, I would be glad to include those in the patch as
well.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + Everyone has their own god. +

Вложения

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #8354: stripped positions can generate nonzero rank in ts_rank_cd
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: PQclientEncoding() returns -1, resulting in possible assertion failure in psql