wiki.techinc.nl/tests/phpunit/includes/search
David Causse 187ada1cf4 Fix phrase search
Partially revert I61dc536 that broke phrase search support.

Fix phrase search by making explicit that there are two
kind of legalSearchChars() usecases :

- the chars allowed to be part of the search query (including special
  syntax chars such as " and *). Used by SearchDatabase::filter() to
  cleanup the whole query string (the default).

- the chars allowed to be part of a search term (excluding special
  syntax chars) Used by search engine implementaions when parsing with
  a regex.

For future reference:
Originally this distinction was made "explicit" by calling directly
SearchEngine::legalSearchChars() during the parsing stage. This was
broken by Iaabc10c by enabling inheritance.
This patch adds a new optional param to legalSearchChars to make this
more explicit.

Also remove the function I introduced in I61dc536 (I wrongly assumed
that the disctinction made between legalSearchChars usecases was due
to a difference in behavior between indexing and searching).

Added more tests to prevent this from happening in the future.

Bug: T167798
Change-Id: Ibdc796bb2881a2ed8194099d8c9f491980010f0f
2017-07-03 11:44:48 +02:00
..
ParserOutputSearchDataExtractorTest.php Extract ParserOutput search index data fields from WikiTextContentHandler 2016-08-19 09:26:17 -04:00
SearchEnginePrefixTest.php build: Prepare for mediawiki/mediawiki-codesniffer to 0.9.0 2017-06-26 17:14:31 +00:00
SearchEngineTest.php Fix phrase search 2017-07-03 11:44:48 +02:00
SearchIndexFieldTest.php Fix php code style 2017-05-05 12:03:54 +00:00
SearchSuggestionSetTest.php build: Prepare for mediawiki/mediawiki-codesniffer to 0.9.0 2017-06-26 17:14:31 +00:00