Zerpex Posted March 13, 2012 Share Posted March 13, 2012 Hi guys! I'm trying out fulltext search in MySQL, when I do my query like this: ALTER TABLE `products` ADD FULLTEXT(`name`, `breadcrumb`, `description`, `brand`, `price`, `year`, `km`, `usage`, `type`); I get an error, that it can't add the FULLTEXT to price like this: Column 'price' cannot be part of FULLTEXT index Is it because I've set it to float, that I can't do it? Best regards, Lucas R. Link to comment https://forums.phpfreaks.com/topic/258809-using-fulltext-search-on-float/ Share on other sites More sharing options...
Muddy_Funster Posted March 13, 2012 Share Posted March 13, 2012 you can only apply a fulltext index to a field that can contain text....would have thought that was fairly self evident . Moreove your should only be applying a fulltext index to long string fields that you are going to want to part-search, fields like name and type generaly gain no benefit from fultext indexing. I suggest you research a little before "playing" with indexing. Link to comment https://forums.phpfreaks.com/topic/258809-using-fulltext-search-on-float/#findComment-1326736 Share on other sites More sharing options...
Zerpex Posted March 13, 2012 Author Share Posted March 13, 2012 you can only apply a fulltext index to a field that can contain text....would have thought that was fairly self evident . Moreove your should only be applying a fulltext index to long string fields that you are going to want to part-search, fields like name and type generaly gain no benefit from fultext indexing. I suggest you research a little before "playing" with indexing. Hia Muddy, the problem is, I need to be able to search, etc if I have a text input thingy, it should be able to search in columns, like name, price, brand, description, km, usage etc. But I will try find a solution! Thank you alot! Link to comment https://forums.phpfreaks.com/topic/258809-using-fulltext-search-on-float/#findComment-1326737 Share on other sites More sharing options...
Muddy_Funster Posted March 13, 2012 Share Posted March 13, 2012 I'm sorry....whats a "text input thingy"? Link to comment https://forums.phpfreaks.com/topic/258809-using-fulltext-search-on-float/#findComment-1326739 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.