Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WR0hd-00016O-C4 for pgsql-bugs@arkaria.postgresql.org; Fri, 21 Mar 2014 14:45:45 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WR0hc-0007Ir-QX for pgsql-bugs@arkaria.postgresql.org; Fri, 21 Mar 2014 14:45:44 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WR0hb-0007H5-0s for pgsql-bugs@postgresql.org; Fri, 21 Mar 2014 14:45:43 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WR0hJ-0006FI-EZ for pgsql-bugs@postgresql.org; Fri, 21 Mar 2014 14:45:42 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s2LEjIJq016234; Fri, 21 Mar 2014 10:45:18 -0400 From: Tom Lane To: Bruce Momjian cc: Alexander Hill , pgsql-bugs@postgresql.org Subject: Re: BUG #8354: stripped positions can generate nonzero rank in ts_rank_cd In-reply-to: <20140321134323.GA1701@momjian.us> References: <20140131212251.GQ19957@momjian.us> <20140211154537.GA2289@momjian.us> <20140212143151.GA12551@momjian.us> <20140321134323.GA1701@momjian.us> Comments: In-reply-to Bruce Momjian message dated "Fri, 21 Mar 2014 09:43:23 -0400" Date: Fri, 21 Mar 2014 10:45:18 -0400 Message-ID: <16233.1395413118@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) 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 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. 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