Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 2A77D1AB3539 for ; Wed, 18 Jul 2012 03:48:31 -0300 (ADT) Received: from corp.tradeindia.com ([61.16.154.82] helo=zmta01.trade-india-local.com) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SrO3f-00089r-9g for pgsql-sql@postgresql.org; Wed, 18 Jul 2012 06:48:30 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by zmta01.trade-india-local.com (Postfix) with ESMTP id 728F844E485A for ; Wed, 18 Jul 2012 12:18:14 +0530 (IST) X-Virus-Scanned: amavisd-new at zmta01.trade-india-local.com Received: from zmta01.trade-india-local.com ([127.0.0.1]) by localhost (zmta01.trade-india-local.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5mnT0HlD1mAp for ; Wed, 18 Jul 2012 12:18:13 +0530 (IST) Received: from zmbox01.trade-india-local.com (zmbox01.trade-india-local.com [192.168.1.111]) by zmta01.trade-india-local.com (Postfix) with ESMTP id DBC6944E4827 for ; Wed, 18 Jul 2012 12:18:13 +0530 (IST) Date: Wed, 18 Jul 2012 12:18:13 +0530 (IST) From: Puneet Mishra To: pgsql-sql@postgresql.org Message-ID: <6455362.707251342594093871.JavaMail.root@zmbox01.trade-india-local.com> In-Reply-To: <2581995.698861342593306050.JavaMail.root@zmbox01.trade-india-local.com> Subject: Order preservation of search phrases in postgresql FTS/OpenFTS MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_33878_21242673.1342594093871" X-Originating-IP: [192.168.1.113] X-Mailer: Zimbra 6.0.1_GA_1816.DEBIAN4.0 (ZimbraWebClient - FF3.0 (Linux)/6.0.1_GA_1816.DEBIAN4.0) X-Pg-Spam-Score: -0.5 (/) X-Archive-Number: 201207/18 X-Sequence-Number: 36755 ------=_Part_33878_21242673.1342594093871 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Dear List , Is there anyway to penalize (severly) the ranking of those documents where the vector items do not appear in the same order as the items of to_tsquery ie the initial search terms. For example if a keyword "Red Wine" is searched then it should only match "Red Wine" or "Red Grape Wine" or, but should not match "Wine Red color" or "Wine ..... .... .. .. Red" etc. Currently it penalizes but not as severely as we would want it to. Also any pointers to the places (in source code) where things can be tweaked shall be greatly appreciated. Regards, Puneet Mishra ------=_Part_33878_21242673.1342594093871 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit
Dear List ,

Is there anyway to penalize (severly)  the ranking of those documents where the
vector items do not appear in the same order as the items of to_tsquery ie
the initial search terms.

For example if a keyword  "Red Wine" is searched then it should only match "Red Wine" or "Red Grape Wine" or,
but should not match "Wine Red color" or "Wine ..... .... .. .. Red" etc.


Currently it penalizes but not as severely as we would want it to.

Also any pointers to the places (in source code) where things can be tweaked
shall be greatly appreciated.

Regards,

Puneet Mishra

------=_Part_33878_21242673.1342594093871--