Jump to content

Using fulltext search on 'float'


Zerpex

Recommended Posts

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

you can only apply a fulltext index to a field that can contain text....would have thought that was fairly self evident :shrug:.  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.

you can only apply a fulltext index to a field that can contain text....would have thought that was fairly self evident :shrug:.  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!

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.