472,121 Members | 1,578 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,121 software developers and data experts.

Tsearch case sensitive with dotted search terms.


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
2 1371
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
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.

Similar topics

2 posts views Thread by chelleybabyger | last post: by
2 posts views Thread by Barbara White | last post: by
3 posts views Thread by Barbara White | last post: by
reply views Thread by Joerg Erdmenger | last post: by
13 posts views Thread by Nigel J. Andrews | last post: by
reply views Thread by Rajesh Kumar Mallah | last post: by
1 post views Thread by ericswebber | last post: by
1 post views Thread by benhoefer | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.