Jump to content

Fulltext Prepend Asterisk


asmith

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/268699-fulltext-prepend-asterisk/
Share on other sites

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. :/

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.