MySQL Forums
Forum List  »  Performance

Re: Hyphen in FULLTEXT
Posted by: Jon Stephens
Date: November 16, 2023 08:12PM

I think it's likely that the '-' characters are being interpreted as search operators.

I'm also not sure why you encase the search string with two sets of quotes. Note that single quotes and double quotes cause different behaviour.

MATCH(column) AGAINST('$strings' IN BOOLEAN MODE) is intended to search for text columns in which the string or strings given in AGAINST() are present (+) and/or absent (-). As you're using it here, you might as well just use SELECT value FROM table WHERE value = $string.

See for more info and examples.

Another alternative for finding columns in which a given string is present is to use LIKE--see


Jon Stephens
MySQL Documentation Team @ Oracle

MySQL Dev Zone
MySQL Server Documentation

Options: ReplyQuote

Written By
November 16, 2023 03:19PM
Re: Hyphen in FULLTEXT
November 16, 2023 08:12PM
November 18, 2023 10:56AM
November 20, 2023 12:12PM

Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.