Re: Tsearch case sensitive with dotted search terms.

From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: Rajesh Kumar Mallah <mallah(at)trade-india(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Tsearch case sensitive with dotted search terms.
Date: 2004-06-07 16:52:05
Message-ID: 40C49D35.9030006@sigaev.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Use tsearch2, tsearch is marked as obsolet :)
More serious: apply attached patch, recompile and reinstall contrib/tsearch
module. Patch commited to 7.3,7.4 and 7.5 branches, it fix asymetrical lexeme
processing for text and query.

Rajesh Kumar Mallah wrote:
>
> Hi,
>
> I think when search terms have "."s in them they become case sensitive
> in tsearch searches. How can we make them insensitive?
>
> Regds
> Mallah.
>
>
>
>
> tradein_clients=# SELECT co_name , co_name_index from iid_listing where
> co_name_index ## 'a.u.m&logistics';
> +------------------------------------+--------------------------------------+
> | co_name |
> co_name_index |
> +------------------------------------+--------------------------------------+
> | A.U.M. LOGISTICS (I) PVT. LTD. | 'ltd' 'pvt' 'a.u.m'
> 'logist' |
> | A.U.M. LOGISTICS (I) PVT. LTD. | 'ltd' 'pvt' 'a.u.m'
> 'logist' |
> | A.U.M. LOGISTICS (INDIA) PVT. LTD. | 'ltd' 'pvt' 'a.u.m' 'india'
> 'logist' |
> +------------------------------------+--------------------------------------+
> (3 rows)
>
> Time: 404.543 ms
> tradein_clients=# SELECT co_name , co_name_index from iid_listing where
> co_name_index ## 'a.u.m&LOGISTICS';
> +------------------------------------+--------------------------------------+
> | co_name |
> co_name_index |
> +------------------------------------+--------------------------------------+
> | A.U.M. LOGISTICS (I) PVT. LTD. | 'ltd' 'pvt' 'a.u.m'
> 'logist' |
> | A.U.M. LOGISTICS (I) PVT. LTD. | 'ltd' 'pvt' 'a.u.m'
> 'logist' |
> | A.U.M. LOGISTICS (INDIA) PVT. LTD. | 'ltd' 'pvt' 'a.u.m' 'india'
> 'logist' |
> +------------------------------------+--------------------------------------+
> (3 rows)
>
> Time: 425.697 ms
> tradein_clients=# SELECT co_name , co_name_index from iid_listing where
> co_name_index ## 'A.U.M&LOGISTICS';
> +---------+---------------+
> | co_name | co_name_index |
> +---------+---------------+
> +---------+---------------+
> (0 rows)
>

--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru

Attachment Content-Type Size
tp.gz application/x-tar 337 bytes

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Lincoln Yeoh 2004-06-07 17:00:35 Re: Backup and Restore of PostgreSQL
Previous Message Prabu Subroto 2004-06-07 16:38:33 postgres on SuSE 9.1