Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 1A4BE476323 for ; Tue, 7 Jan 2003 11:25:42 -0500 (EST) Received: from mailstore-1.mail.knowledge.com (frida.london.knowtion.net [213.170.2.69]) by postgresql.org (Postfix) with ESMTP id 53009475E31 for ; Tue, 7 Jan 2003 11:25:41 -0500 (EST) Received: from [213.155.153.61] (helo=petergalbavydes) by mailstore-1.mail.knowledge.com with asmtp (Exim 3.33 #1) id 18VwXv-0002gI-00; Tue, 07 Jan 2003 16:25:43 +0000 Message-ID: <023f01c2b669$6ce39270$4528a8c0@cblan.mblox.com> From: "Peter Galbavy" To: "Tom Lane" Cc: References: <001301c2b4a6$f969b360$36bd10ac@walrus> <021001c2b666$752c1d60$4528a8c0@cblan.mblox.com> <13705.1041956070@sss.pgh.pa.us> Subject: Re: weighting (the results of) a query ? Date: Tue, 7 Jan 2003 16:25:43 -0000 Organization: Knowtion Ltd. MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/70 X-Sequence-Number: 10935 > Most likely you should write UNION ALL, not UNION. As given, the query > will go through a pass of attempted duplicate-row-elimination, which is > almost certainly not what you want. Not sure - what I want is only one row per real row but ordered as per the constants. When you say duplicate-row-elimination do you mean including the 'constant' weighting, in which case UNION ALL is probably right. At the moment, the dataset returned appears correctly de-duplicated. What I mean is when an image row has both 'eat static' in the caption and as a keyword, I want it returned only once... Peter