* @ingroup Search
*/
class SearchSqlite extends SearchEngine {
- var $strictMatching = true;
-
// Cached because SearchUpdate keeps recreating our class
private static $fulltextSupported = null;
$searchon = '';
$this->searchTerms = array();
- # FIXME: This doesn't handle parenthetical expressions.
$m = array();
if( preg_match_all( '/([-+<>~]?)(([' . $lc . ']+)(\*?)|"[^"]*")/',
$filteredText, $m, PREG_SET_ORDER ) ) {
$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 );
$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" );
}