aboutsummaryrefslogtreecommitdiffstats
path: root/includes/search/SearchSqlite.php
diff options
context:
space:
mode:
authorMax Semenik <maxsem@users.mediawiki.org>2010-01-10 10:02:55 +0000
committerMax Semenik <maxsem@users.mediawiki.org>2010-01-10 10:02:55 +0000
commit76fb2dba7e957d9ed16c7092fe5aab234ef4f501 (patch)
tree3698dc0bffe555b33237abb9e44d716a87d63074 /includes/search/SearchSqlite.php
parentf5b003f842d3ebcefefa3cccc5513833513ac1f4 (diff)
downloadmediawikicore-76fb2dba7e957d9ed16c7092fe5aab234ef4f501.tar.gz
mediawikicore-76fb2dba7e957d9ed16c7092fe5aab234ef4f501.zip
Cleared SearchSqlite from some mysqlisms from r58322
Notes
Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/60884
Diffstat (limited to 'includes/search/SearchSqlite.php')
-rw-r--r--includes/search/SearchSqlite.php14
1 files changed, 3 insertions, 11 deletions
diff --git a/includes/search/SearchSqlite.php b/includes/search/SearchSqlite.php
index 404b4a4dae9a..b5f45e1ba2e6 100644
--- a/includes/search/SearchSqlite.php
+++ b/includes/search/SearchSqlite.php
@@ -26,8 +26,6 @@
* @ingroup Search
*/
class SearchSqlite extends SearchEngine {
- var $strictMatching = true;
-
// Cached because SearchUpdate keeps recreating our class
private static $fulltextSupported = null;
@@ -64,7 +62,6 @@ class SearchSqlite extends SearchEngine {
$searchon = '';
$this->searchTerms = array();
- # FIXME: This doesn't handle parenthetical expressions.
$m = array();
if( preg_match_all( '/([-+<>~]?)(([' . $lc . ']+)(\*?)|"[^"]*")/',
$filteredText, $m, PREG_SET_ORDER ) ) {
@@ -78,13 +75,9 @@ class SearchSqlite extends SearchEngine {
$term = str_replace( '"', '', $term );
$quote = '"';
}
-
+
if( $searchon !== '' ) $searchon .= ' ';
- if( $this->strictMatching && ($modifier == '') ) {
- // If we leave this out, boolean op defaults to OR which is rarely helpful.
- $modifier = '+';
- }
-
+
// Some languages such as Serbian store the input form in the search index,
// so we may need to search for matches in multiple writing system variants.
$convertedVariants = $wgContLang->autoConvertToAllVariants( $term );
@@ -127,8 +120,7 @@ class SearchSqlite extends SearchEngine {
$regexp = $this->regexTerm( $term, $wildcard );
$this->searchTerms[] = $regexp;
}
- wfDebug( __METHOD__ . ": Would search with '$searchon'\n" );
- wfDebug( __METHOD__ . ': Match with /' . implode( '|', $this->searchTerms ) . "/\n" );
+
} else {
wfDebug( __METHOD__ . ": Can't understand search query '{$filteredText}'\n" );
}