Fix highlighting for phrase queries
authorDavid Causse <dcausse@wikimedia.org>
Thu, 22 Jun 2017 12:48:14 +0000 (14:48 +0200)
committerDavid Causse <dcausse@wikimedia.org>
Mon, 26 Jun 2017 07:53:13 +0000 (09:53 +0200)
commitf230f5dcc7d663b7bc8278f26311041243e62b22
treee293d659c5a4d43e44a5d6245ad9b107541904df
parentb2b983a3bd90cc081f33282fed50bb8ee37101d0
Fix highlighting for phrase queries

I think the bug was introduced during a cleanup in Iaabc10c.
I don't think that " should be part of the legalSearchChars at query
time, it seems to break the regex.
The strategy here is to distinguish legalSearchChars used query time vs
the ones used at index time by introducing:
SearchEngine::legalSearchCharsForUpdate()

Bug: T167798
Change-Id: I61dc53665e26d3c6c48caed78dd3bbde9a33def7
includes/deferred/SearchUpdate.php
includes/search/SearchEngine.php
includes/search/SearchMySQL.php
includes/search/SearchOracle.php
includes/search/SearchSqlite.php
tests/phpunit/includes/search/SearchEngineTest.php