-
Bug
-
Resolution: Fixed
-
Major
-
3.0.7-PL1
-
None
-
PHP 5.3.1, MySQL 5.1.41, Opera 10.60 / Firefox 3.0.5
(using MySQL fulltext search)
Currently it's impossible to search for a phrase like "Anna-Sophie" since phpBB always interprets the minus character as a boolean NOT, despite the fact it's enclosed in quotation marks. Then you are tempted to adjust your search term into "Anna Sophie" but this also finds texts like Anna Maria Sophie because phpBB prepends these with pluses which is not wanted at all.
The culprit is in function split_keywords() of fulltext_mysql.php:
$match = array('#\sand\s#iu', '#\sor\s#iu', '#\snot\s#iu', '#\+#', '#-#', '#\|#');
|
...which could be slightly more sensible to only convert characters if they are the first character or following a whitespace:
$match = array('#\sand\s#iu', '#\sor\s#iu', '#\snot\s#iu', '#(^|\s)\+#', '#(^|\s)-#', '#(^|\s)\|#');
|
With this modification everybody can finally do searches like "Anna-Sophie" and even "Blank+Jones".
- is related to
-
PHPBB-11288 "Fulltext native" search fooled by hyphens
- Closed