asmith Posted September 23, 2012 Share Posted September 23, 2012 Hello, This is kinda driving me crazy. My search key words doesn't seem to return the result I want. I have this name that ends with a name like this: something_mykeyword So I use FULLTEXT for MATCH(name_column) AGAINST ('mykeyword') and it doesn't find the row. The manual says that * in boolean mode must just append. In this case I need it to be like this: MATCH(name_column) AGAINST ('*mykeyword' in BOOLEAN MODE) Let's say the record doesn't end and mykeyword is in the middle of a bigger word: somebiggermykeywordlying around How do you find it with FULLTEXT? Thanks for your time Mysql 5.5 Quote Link to comment Share on other sites More sharing options...
Barand Posted September 23, 2012 Share Posted September 23, 2012 Would this suffice ... WHERE name_column LIKE '%keyword%' Quote Link to comment Share on other sites More sharing options...
asmith Posted September 24, 2012 Author Share Posted September 24, 2012 Are you suggesting to get rid of the fulltext index/search? it is not possible to find those conditions with fulltext? Quote Link to comment Share on other sites More sharing options...
Barand Posted September 24, 2012 Share Posted September 24, 2012 Not at all. FullText can do searches you can't do easily other ways. But just because you have set a full text index it doesn't mean you can't do a search by other methods. Horses for courses. Quote Link to comment Share on other sites More sharing options...
asmith Posted September 25, 2012 Author Share Posted September 25, 2012 I see. I guess I could add 'OR name_column LIKE '%mykeyword%' add the end of the statement so that if fulltext failed, it searches with LIKE. But still this makes the query bit heavier and MySQL is not really good at searching large data. I have sphinx setup for another table though, ultimately I'll add this table too. :/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.