Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WS9kf-0007Ie-Fg for pgsql-bugs@arkaria.postgresql.org; Mon, 24 Mar 2014 18:37:37 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WS9ke-0007UO-Um for pgsql-bugs@arkaria.postgresql.org; Mon, 24 Mar 2014 18:37:36 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WS9kd-0007Sb-Ce for pgsql-bugs@postgresql.org; Mon, 24 Mar 2014 18:37:35 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WS9ka-0002me-UM for pgsql-bugs@postgresql.org; Mon, 24 Mar 2014 18:37:34 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1WS9kY-00040G-Cf; Mon, 24 Mar 2014 14:37:30 -0400 Date: Mon, 24 Mar 2014 14:37:30 -0400 From: Bruce Momjian To: Tom Lane Cc: Alexander Hill , pgsql-bugs@postgresql.org Subject: Re: BUG #8354: stripped positions can generate nonzero rank in ts_rank_cd Message-ID: <20140324183730.GD15836@momjian.us> References: <20140131212251.GQ19957@momjian.us> <20140211154537.GA2289@momjian.us> <20140212143151.GA12551@momjian.us> <20140321134323.GA1701@momjian.us> <16233.1395413118@sss.pgh.pa.us> <20140321221015.GA26056@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140321221015.GA26056@momjian.us> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -2.4 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On Fri, Mar 21, 2014 at 06:10:15PM -0400, Bruce Momjian wrote: > On Fri, Mar 21, 2014 at 10:45:18AM -0400, Tom Lane wrote: > > Bruce Momjian 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 stripped lexemes in the > > 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. Patch applied with this commit message: Fix ts_rank_cd() to ignore stripped lexemes Previously, stripped lexemes got a default location and could be considered if mixed with non-stripped lexemes. BACKWARD INCOMPATIBILITY CHANGE -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. + -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs