Skip site navigation (1) Skip section navigation (2)

Comparing tsearch2 vectors.

From: Rajesh Kumar Mallah <mallah(at)trade-india(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Comparing tsearch2 vectors.
Date: 2004-07-12 08:46:06
Message-ID: 40F24FCE.3020103@trade-india.com (view raw or flat)
Thread:
Lists: pgsql-sql
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.

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=#

-- 

regds
Mallah.

Rajesh Kumar Mallah
+---------------------------------------------------+
| Tradeindia.com  (3,11,246) Registered Users 	    | 
| Indias' Leading B2B eMarketPlace                  |
| http://www.tradeindia.com/			    |
+---------------------------------------------------+


Responses

pgsql-sql by date

Next:From: Achilleus MantziosDate: 2004-07-12 10:59:46
Subject: Re: Comparing tsearch2 vectors.
Previous:From: RuggeroDate: 2004-07-12 08:27:53
Subject: Sorting problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group