Bug #68150 | InnoDB FULLTEXT Phrase Logic Incorrect | ||
---|---|---|---|
Submitted: | 22 Jan 2013 21:39 | Modified: | 12 Feb 2013 18:32 |
Reporter: | Greg Dietz | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S3 (Non-critical) |
Version: | 5.6.7 | OS: | Windows |
Assigned to: | CPU Architecture: | Any | |
Tags: | fulltext, innodb |
[22 Jan 2013 21:39]
Greg Dietz
[23 Jan 2013 1:12]
Jesper wisborg Krogh
Verified mysql> SHOW CREATE TABLE testinnodbfull\G *************************** 1. row *************************** Table: testinnodbfull Create Table: CREATE TABLE `testinnodbfull` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `content` text NOT NULL, PRIMARY KEY (`id`), FULLTEXT KEY `IDX_CONTEXT_FULLTEXT` (`content`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 1 row in set (0.01 sec) Same tests works in MyISAM: mysql> CREATE TABLE testmyisamfull LIKE testinnodbfull; Query OK, 0 rows affected (0.24 sec) mysql> ALTER TABLE testmyisamfull ENGINE=MyISAM; Query OK, 0 rows affected (0.15 sec) Records: 0 Duplicates: 0 Warnings: 0 mysql> INSERT INTO testmyisamfull SELECT * FROM testinnodbfull; Query OK, 3 rows affected (0.00 sec) Records: 3 Duplicates: 0 Warnings: 0 mysql> select * -> from testmyisamfull -> where match(content) against('"complicated phrase structure"' in boolean mode); +----+---------------------------------------------------------------------------------+ | id | content | +----+---------------------------------------------------------------------------------+ | 1 | This is a story which has has a complicated phrase structure here in the middle | +----+---------------------------------------------------------------------------------+ 1 row in set (0.01 sec) mysql> select * -> from testmyisamfull -> where match(content) against('+"complicated phrase structure"' in boolean mode); +----+---------------------------------------------------------------------------------+ | id | content | +----+---------------------------------------------------------------------------------+ | 1 | This is a story which has has a complicated phrase structure here in the middle | +----+---------------------------------------------------------------------------------+ 1 row in set (0.00 sec) mysql> select * -> from testmyisamfull -> where match(content) against('"complicated the phrase structure"' in boolean mode); +----+-----------------------------------------------------------+ | id | content | +----+-----------------------------------------------------------+ | 3 | This is a story that has complicated the phrase structure | +----+-----------------------------------------------------------+ 1 row in set (0.01 sec)
[12 Feb 2013 18:32]
John Russell
Added to changelog for 5.6.11: A full-text query using Boolean mode could return zero results in some cases where the search term was a quoted phrase: * If the quoted phrase was preceded by a + sign. For example, this combination of a Boolean + operator and a phrase would return zero results: where match(content) against(+"required term due to plus sign" in boolean mode) * If the quoted phrase contained any stopwords. For example, the stopword "the" inside the phrase caused the query to return zero results: where match(content) against("stopword inside the phrase" in boolean mode)