1

I have the exact problem as described on MySQL Match Fulltext

I need to do search with " . " (period) character, i'm using mysql 5.6.4, my table has innodb engine due i need to use some foreigns keys, the field 'fullname' has a fulltext index witg utf8_general_ci collation and it has about 34k+ records, i have in my config ini ft_min_word_len = "2" and ft_stopword_file ="" anyway, it's work perfect with words, the problem is just the period character

so if i tried to search with %like%

WHERE  `fullname` LIKE  '%1.9%'
1,061 total, 0.0316 seg

   156 1.9 JTD Impression
    147 1.9 D
    159 1.9 JTS
    GT 1.9 JTD 16V M-Jet Impression
    159 Sportwagon 1.9 JTD
    159 1.9 JTD

With match against

WHERE MATCH (
fullname
)
AGAINST (
'1.9'
IN BOOLEAN
MODE
)
0 total, 0.0048 seg

What can i do? Thanks

Community
  • 1
  • 1
Colas
  • 157
  • 1
  • 2
  • 12

1 Answers1

2

I've been trying to find an answer to the same question, and there doesn't seem to be a good way to handle this right now because "." is used as a deliminator. For now I'm replacing "." with "__pd" when inserting a row and when querying the table. Not ideal, but it works for me.

Alden
  • 6,553
  • 2
  • 36
  • 50