From 1420f3a9827a39e5c6c998f6fa35a6fc97903145 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Mon, 24 Mar 2014 14:36:36 -0400 Subject: 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 --- doc/src/sgml/textsearch.sgml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/textsearch.sgml b/doc/src/sgml/textsearch.sgml index 604e54579de..9e78286bb59 100644 --- a/doc/src/sgml/textsearch.sgml +++ b/doc/src/sgml/textsearch.sgml @@ -889,9 +889,13 @@ SELECT plainto_tsquery('english', 'The Fat & Rats:C'); - This function requires positional information in its input. - Therefore it will not work on stripped tsvector - values — it will always return zero. + 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. (See for more information + about the strip function and positional information + in tsvectors.) -- cgit v1.2.3