By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,017 Members | 1,004 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,017 IT Pros & Developers. It's quick & easy.

Tsearch case sensitive with dotted search terms.

P: n/a

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)
Nov 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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: te****@sigaev.ru
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 23 '05 #2

P: n/a
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: te****@sigaev.ru
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.