| Bug #17103 | match-against a phrase in boolean mode | ||
|---|---|---|---|
| Submitted: | 3 Feb 2006 18:43 | Modified: | 11 Apr 2006 19:01 |
| Reporter: | Mary Miller-Clark | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | MySQL Server: Documentation | Severity: | S5 (Performance) |
| Version: | 5.0 | OS: | Windows (windows 2003 server) |
| Assigned to: | Paul DuBois | CPU Architecture: | Any |
[5 Feb 2006 11:26]
Valeriy Kravchuk
Thank you for a problem report. Please, provide a simple but complete set of SQL statements to demonstrate the problem you described.
[11 Apr 2006 19:01]
Paul DuBois
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.mysql.com/documentation/ and the instructions on how to report a bug at http://bugs.mysql.com/how-to-report.php Additional info: See http://dev.mysql.com/doc/refman/5.0/en/fulltext-boolean.html: A phrase that is enclosed within double quote (`"') characters matches only rows that contain the phrase literally, as it was typed. The full-text engine splits the phrase into words, performs a search in the FULLTEXT index for the words. Prior to MySQL 5.0.3, the engine then performed a substring search for the phrase in the records that were found, so the match must include non-word characters in the phrase. As of MySQL 5.0.3, non-word characters need not be matched exactly: Phrase searching requires only that matches contain exactly the same words as the phrase and in the same order. For example, "test phrase" matches "test, phrase" in MySQL 5.0.3, but not before. The reported query is incorrect: match astring against ("anything/goes here" in boolean mode); should be: match astring against ('"anything/goes here"' in boolean mode);

Description: There is something strange about the FULLTEXT SEARCH, MATCH AGAINST IN BOOLEAN MODE that is not intuitive when searching for a PHRASE, and that is the situation where the phrase contains a special character like a backslash(/). The documentation states that anything within the double quotes of the phrase, including punctuation and white space, is used in the search. Apparently this is not totally true. Anything appearing AFTER the backslash in the AGAINST string is ignored during the matching process. This will result in the return of strings that don't really match the AGAINST phrase. Is this truly the intent of a boolean match against a phrase???? How to repeat: match astring against ("anything/goes here" in boolean mode);