Index: trunk/phase3/includes/search/SearchSqlite.php |
— | — | @@ -26,8 +26,6 @@ |
27 | 27 | * @ingroup Search |
28 | 28 | */ |
29 | 29 | class SearchSqlite extends SearchEngine { |
30 | | - var $strictMatching = true; |
31 | | - |
32 | 30 | // Cached because SearchUpdate keeps recreating our class |
33 | 31 | private static $fulltextSupported = null; |
34 | 32 | |
— | — | @@ -64,7 +62,6 @@ |
65 | 63 | $searchon = ''; |
66 | 64 | $this->searchTerms = array(); |
67 | 65 | |
68 | | - # FIXME: This doesn't handle parenthetical expressions. |
69 | 66 | $m = array(); |
70 | 67 | if( preg_match_all( '/([-+<>~]?)(([' . $lc . ']+)(\*?)|"[^"]*")/', |
71 | 68 | $filteredText, $m, PREG_SET_ORDER ) ) { |
— | — | @@ -78,13 +75,9 @@ |
79 | 76 | $term = str_replace( '"', '', $term ); |
80 | 77 | $quote = '"'; |
81 | 78 | } |
82 | | - |
| 79 | + |
83 | 80 | if( $searchon !== '' ) $searchon .= ' '; |
84 | | - if( $this->strictMatching && ($modifier == '') ) { |
85 | | - // If we leave this out, boolean op defaults to OR which is rarely helpful. |
86 | | - $modifier = '+'; |
87 | | - } |
88 | | - |
| 81 | + |
89 | 82 | // Some languages such as Serbian store the input form in the search index, |
90 | 83 | // so we may need to search for matches in multiple writing system variants. |
91 | 84 | $convertedVariants = $wgContLang->autoConvertToAllVariants( $term ); |
— | — | @@ -127,8 +120,7 @@ |
128 | 121 | $regexp = $this->regexTerm( $term, $wildcard ); |
129 | 122 | $this->searchTerms[] = $regexp; |
130 | 123 | } |
131 | | - wfDebug( __METHOD__ . ": Would search with '$searchon'\n" ); |
132 | | - wfDebug( __METHOD__ . ': Match with /' . implode( '|', $this->searchTerms ) . "/\n" ); |
| 124 | + |
133 | 125 | } else { |
134 | 126 | wfDebug( __METHOD__ . ": Can't understand search query '{$filteredText}'\n" ); |
135 | 127 | } |