Jump to content

Is full_text search case sensitive


neteagle

Recommended Posts

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]By default, the search is performed in case-insensitive fashion. However, you can perform a case-sensitive full-text search by using a binary collation for the indexed columns. For example, a column that uses the latin1 character set of can be assigned a collation of latin1_bin to make it case sensitive for full-text searches.[/quote]

[a href=\"http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html\" target=\"_blank\"]http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html[/a]
[!--quoteo(post=385476:date=Jun 18 2006, 07:58 PM:name=Net Eagle)--][div class=\'quotetop\']QUOTE(Net Eagle @ Jun 18 2006, 07:58 PM) [snapback]385476[/snapback][/div][div class=\'quotemain\'][!--quotec--]
My collation is UTF8-bin. I want the search to be case-insensitive. How can I do that?
[/quote]
I'm fairly sure that you can reset the collation use the COLLATE attribute after the field, but I don't remember the syntax specifically; I'm sure it's in the refman pages.
[!--quoteo(post=386000:date=Jun 20 2006, 08:26 AM:name=fenway)--][div class=\'quotetop\']QUOTE(fenway @ Jun 20 2006, 08:26 AM) [snapback]386000[/snapback][/div][div class=\'quotemain\'][!--quotec--]
I'm fairly sure that you can reset the collation use the COLLATE attribute after the field, but I don't remember the syntax specifically; I'm sure it's in the refman pages.
[/quote]

Thanks fenway, I know it can reset the collation, I just want to know how to make the full_text search function case-insensitive with UTF8.
[!--quoteo(post=386008:date=Jun 20 2006, 09:40 AM:name=Net Eagle)--][div class=\'quotetop\']QUOTE(Net Eagle @ Jun 20 2006, 09:40 AM) [snapback]386008[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Thanks fenway, I know it can reset the collation, I just want to know how to make the full_text search function case-insensitive with UTF8.
[/quote]
I didn't mean reset -- I said that you can change it on-the-fly with the collate attribute to "utf8_general_ci"... see [a href=\"http://dev.mysql.com/doc/refman/5.0/en/charset-collate.html\" target=\"_blank\"]here[/a]. Sorry about the mix-up.
[!--quoteo(post=386284:date=Jun 21 2006, 12:08 AM:name=fenway)--][div class=\'quotetop\']QUOTE(fenway @ Jun 21 2006, 12:08 AM) [snapback]386284[/snapback][/div][div class=\'quotemain\'][!--quotec--]
I didn't mean reset -- I said that you can change it on-the-fly with the collate attribute to "utf8_general_ci"... see [a href=\"http://dev.mysql.com/doc/refman/5.0/en/charset-collate.html\" target=\"_blank\"]here[/a]. Sorry about the mix-up.
[/quote]

Thanks fenway, I got it

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.