pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <bruce@momjian.us>
Cc: Alexander Hill <alex@hill.net.au>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #8354: stripped positions can generate nonzero rank in ts_rank_cd
Date: Fri, 21 Mar 2014 10:45:18 -0400
Message-ID: <16233.1395413118@sss.pgh.pa.us> (raw)
In-Reply-To: <20140321134323.GA1701@momjian.us>
References: <E1V59Oo-0007mB-GA@wrigleys.postgresql.org>
	<20140131212251.GQ19957@momjian.us>
	<CA+KBOKxsaU7Q-Qc6-YV99AY1U_Rb0SbR78Bs5xM6=12PRMKJKA@mail.gmail.com>
	<20140211154537.GA2289@momjian.us>
	<CA+KBOKyWkK-EBoiJ96iPDu-ZA=TTENVOC3u-3gFHvQ0uBzWuVQ@mail.gmail.com>
	<20140212143151.GA12551@momjian.us>
	<CA+KBOKxzfHNT96i_Ct6304OEmHUAzY+-sa-OdK7XgSSb-bx3eA@mail.gmail.com>
	<20140321134323.GA1701@momjian.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

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.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (12+ messages)  latest in thread

Message-ID: <16233.1395413118@sss.pgh.pa.us>
Permalink:  ../16233.1395413118@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/16233.1395413118@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, bruce@momjian.us, alex@hill.net.au
  Subject: Re: BUG #8354: stripped positions can generate nonzero rank in ts_rank_cd
  In-Reply-To: <16233.1395413118@sss.pgh.pa.us>
  References: <E1V59Oo-0007mB-GA@wrigleys.postgresql.org> <20140131212251.GQ19957@momjian.us> <CA+KBOKxsaU7Q-Qc6-YV99AY1U_Rb0SbR78Bs5xM6=12PRMKJKA@mail.gmail.com> <20140211154537.GA2289@momjian.us> <CA+KBOKyWkK-EBoiJ96iPDu-ZA=TTENVOC3u-3gFHvQ0uBzWuVQ@mail.gmail.com> <20140212143151.GA12551@momjian.us> <CA+KBOKxzfHNT96i_Ct6304OEmHUAzY+-sa-OdK7XgSSb-bx3eA@mail.gmail.com> <20140321134323.GA1701@momjian.us> <16233.1395413118@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox