Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id A590A2E015C for ; Sat, 12 Jan 2008 17:32:28 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 90361-10 for ; Sat, 12 Jan 2008 17:32:23 -0400 (AST) Received: from momjian.us (momjian.us [70.90.9.53]) by postgresql.org (Postfix) with ESMTP id 822E62E004F for ; Sat, 12 Jan 2008 17:32:22 -0400 (AST) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id m0CLWNF28879 for pgsql-docs@postgresql.org; Sat, 12 Jan 2008 16:32:23 -0500 (EST) From: Bruce Momjian Message-Id: <200801122132.m0CLWNF28879@momjian.us> Subject: Documentation bug in 8.3? To: PostgreSQL-documentation Date: Sat, 12 Jan 2008 16:32:23 -0500 (EST) X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/13 X-Sequence-Number: 4742 Reading through the text search data type docs: http://www.postgresql.org/docs/8.3/static/datatype-textsearch.html#DATATYPE-TSVECTOR it says: Optionally, integer position(s) can be attached to any or all of the lexemes: SELECT 'a:1 fat:2 cat:3 sat:4 on:5 a:6 mat:7 and:8 ate:9 a:10 fat:11 rat:12'::tsvector; tsvector ------------------------------------------------------------------------------- 'a':1,6,10 'on':5 'and':8 'ate':9 'cat':3 'fat':2,11 'mat':7 'rat':12 'sat':4 A position normally indicates the source word's location in the document. Positional information can be used for proximity ranking. Position values can range from 1 to 16383; larger numbers are silently clamped to 16383. Duplicate position entries are discarded. ---------------------------------------- However in my testing of 8.3 duplicate position entries are not discarded: test=> SELECT 'a:1 b:1'::tsvector; tsvector ------------- 'a':1 'b':1 (1 row) -- Bruce Momjian http://momjian.us EnterpriseDB http://postgres.enterprisedb.com + If your life is a hard drive, Christ can be your backup. +