X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1718CD1B1CE for ; Mon, 12 Jul 2004 08:50:11 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 89242-02 for ; Mon, 12 Jul 2004 11:50:13 +0000 (GMT) Received: from matrix.gatewaynet.com (matrix.gatewaynet.com [217.19.69.50]) by svr1.postgresql.org (Postfix) with ESMTP id 0A244D1B18F for ; Mon, 12 Jul 2004 08:50:00 -0300 (ADT) Received: from matrix.gatewaynet.com (localhost.localdomain [127.0.0.1]) by matrix.gatewaynet.com (8.12.8/8.12.8) with ESMTP id i6CAxlQr003635; Mon, 12 Jul 2004 13:59:47 +0300 Received: from localhost (achill@localhost) by matrix.gatewaynet.com (8.12.8/8.12.8/Submit) with ESMTP id i6CAxkZu003631; Mon, 12 Jul 2004 13:59:47 +0300 Date: Mon, 12 Jul 2004 13:59:46 +0300 (EEST) From: Achilleus Mantzios To: Rajesh Kumar Mallah Cc: pgsql-sql@postgresql.org Subject: Re: Comparing tsearch2 vectors. In-Reply-To: <40F24FCE.3020103@trade-india.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/64 X-Sequence-Number: 18316 O kyrios Rajesh Kumar Mallah egrapse stis Jul 12, 2004 : > > Hi, > > We want to compare strings after stemming. Can anyone > tell me what is the best method. I was thinking to compare > the tsvector ,but there is no operator for that. I'd tokenize each string and then apply lexize() to get the equivalent stemified word, but what exactly are you trying to accomplish? > > Regds > Mallah. > > > > tradein_clients=# SELECT to_tsvector('handicraft exporters'); > +---------------------------+ > | to_tsvector | > +---------------------------+ > | 'export':2 'handicraft':1 | > +---------------------------+ > (1 row) > > Time: 710.315 ms > tradein_clients=# > tradein_clients=# SELECT to_tsvector('handicrafts exporter'); > +---------------------------+ > | to_tsvector | > +---------------------------+ > | 'export':2 'handicraft':1 | > +---------------------------+ > (1 row) > > Time: 400.679 ms > tradein_clients=# SELECT to_tsvector('Hi there') = to_tsvector('Hi there'); > ERROR: operator does not exist: tsvector = tsvector > HINT: No operator matches the given name and argument type(s). You may > need to add explicit type casts. > tradein_clients=# > > -- -Achilleus