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

Link to comment
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.

 

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.