-
Bug
-
Resolution: Fixed
-
Major
-
None
-
3.1.6
-
None
-
Debian Wheezy
PHP 5.4.45, PerconaDB 5.6.27-76.0
Sphinx 2.0.4-release (r3135)
When search keywords contains // simbols, for example ".... http:// ....." get search error:
index index_phpbb_...._delta,index_phpbb_...._main: syntax error, unexpected '/' near '//' |
After adding EscapeString function from /includes/sphinxapi.php to file /phpbb/search/fulltext_sphinx.php search returned normal result, found all ".... http:// ...."
open /phpbb/search/fulltext_sphinx.php
find
$result = $this->sphinx->Query($search_query_prefix . str_replace('"', '"', $this->search_query), $this->indexes); |
before add
$this->search_query = $this->sphinx->EscapeString($this->search_query); |
But it is not correct way, because operator NOT (simbols -, !) was escaped by this function.
How to fix it? Or may be it is not bug?..
- is duplicated by
-
PHPBB-15367 Sphinx search backend doesn't escape special characters
- Closed