'SearchPostgres' => 'includes/search/SearchPostgres.php',
'SearchResult' => 'includes/search/SearchResult.php',
'SearchResultSet' => 'includes/search/SearchResultSet.php',
- 'SearchResultTooMany' => 'includes/search/SearchEngine.php',
'SearchSqlite' => 'includes/search/SearchSqlite.php',
'SqlSearchResultSet' => 'includes/search/SearchResultSet.php',
}
}
-/**
- * @ingroup Search
- */
-class SearchResultTooMany {
- # # Some search engines may bail out if too many matches are found
-}
-
/**
* Dummy class to be used when non-supported Database engine is present.
* @todo FIXME: Dummy class should probably try something at least mildly useful,
$olderror = error_reporting( E_ERROR );
$resultSet = $this->db->resultObject( $this->db->query( $q, 'SearchPostgres', true ) );
error_reporting( $olderror );
- if ( !$resultSet ) {
- // Needed for "Query requires full scan, GIN doesn't support it"
- return new SearchResultTooMany();
- }
return new PostgresSearchResultSet( $resultSet, $this->searchTerms );
}
$olderror = error_reporting( E_ERROR );
$resultSet = $this->db->resultObject( $this->db->query( $q, 'SearchPostgres', true ) );
error_reporting( $olderror );
- if ( !$resultSet ) {
- return new SearchResultTooMany();
- }
return new PostgresSearchResultSet( $resultSet, $this->searchTerms );
}
$rewritten = $search->replacePrefixes( $term );
$titleMatches = $search->searchTitle( $rewritten );
- if ( !( $titleMatches instanceof SearchResultTooMany ) ) {
- $textMatches = $search->searchText( $rewritten );
- }
+ $textMatches = $search->searchText( $rewritten );
$textStatus = null;
if ( $textMatches instanceof Status ) {
Xml::closeElement( 'div' )
);
- // Sometimes the search engine knows there are too many hits
- if ( $titleMatches instanceof SearchResultTooMany ) {
- $out->wrapWikiMsg( "==$1==\n", 'toomanymatches' );
-
- return;
- }
-
$filePrefix = $wgContLang->getFormattedNsText( NS_FILE ) . ':';
if ( trim( $term ) === '' || $filePrefix === trim( $term ) ) {
$out->addHTML( $this->formHeader( $term, 0, 0 ) );
"search-summary": "",
"searchresults": "Search results",
"searchresults-title": "Search results for \"$1\"",
- "toomanymatches": "Too many matches were returned, please try a different query",
"titlematches": "Page title matches",
"textmatches": "Page text matches",
"notextmatches": "No page text matches",