MediaWiki REL1_37
|
A set of SearchEngine results. More...
Public Member Functions | |
augmentResult (SearchResult $result) | |
Returns extra data for specific result and store it in SearchResult object. | |
extractResults () | |
Extract all the results in the result set as array. | |
extractTitles () | |
Extract all the titles in the result set. | |
getInterwikiResults ( $type=self::SECONDARY_RESULTS) | |
Return a result set of hits on other (multiple) wikis associated with this one. | |
getOffset () | |
getQueryAfterRewrite () | |
getQueryAfterRewriteSnippet () | |
getSuggestionQuery () | |
getSuggestionSnippet () | |
getTotalHits () | |
Some search modes return a total hit count for the query in the entire article database. | |
hasInterwikiResults ( $type=self::SECONDARY_RESULTS) | |
Check if there are results on other wikis. | |
hasMoreResults () | |
hasRewrittenQuery () | |
Some search modes will run an alternative query that it thinks gives a better result than the provided search. | |
hasSuggestion () | |
Some search modes return a suggested alternate term if there are no exact hits. | |
numRows () | |
searchContainedSyntax () | |
Did the search contain search syntax? If so, Special:Search won't offer the user a link to a create a page named by the search string because the name would contain the search syntax. | |
setAugmentedData ( $name, $data) | |
Sets augmented data for result set. | |
shrink ( $limit) | |
Public Attributes | |
const | INLINE_RESULTS = 1 |
Identifier for interwiki results that can be displayed even if no existing main wiki results exist. | |
const | SECONDARY_RESULTS = 0 |
Identifier for interwiki results that are displayed only together with existing main wiki results. | |
A set of SearchEngine results.
Must not be directly implemented by extension, please extend BaseSearchResultSet instead. This interface must only be used for type hinting.
Definition at line 12 of file ISearchResultSet.php.
ISearchResultSet::augmentResult | ( | SearchResult | $result | ) |
Returns extra data for specific result and store it in SearchResult object.
SearchResult | $result |
Referenced by SqlSearchResultSet\extractResults().
ISearchResultSet::extractResults | ( | ) |
Extract all the results in the result set as array.
Implemented in SearchResultSet, and SqlSearchResultSet.
Referenced by PerRowAugmentor\augmentAll().
ISearchResultSet::extractTitles | ( | ) |
ISearchResultSet::getInterwikiResults | ( | $type = self::SECONDARY_RESULTS | ) |
Return a result set of hits on other (multiple) wikis associated with this one.
int | $type |
Implemented in SearchResultSet.
ISearchResultSet::getOffset | ( | ) |
Referenced by SpecialSearch\prevNextLinks().
ISearchResultSet::getQueryAfterRewrite | ( | ) |
Implemented in SearchResultSet.
Referenced by SpecialSearch\prevNextLinks(), and MediaWiki\Search\SearchWidgets\DidYouMeanWidget\rewrittenHtml().
ISearchResultSet::getQueryAfterRewriteSnippet | ( | ) |
Implemented in SearchResultSet.
Referenced by MediaWiki\Search\SearchWidgets\DidYouMeanWidget\rewrittenHtml().
ISearchResultSet::getSuggestionQuery | ( | ) |
Implemented in SearchResultSet.
Referenced by MediaWiki\Search\SearchWidgets\DidYouMeanWidget\suggestionHtml().
ISearchResultSet::getSuggestionSnippet | ( | ) |
Implemented in SearchResultSet.
Referenced by MediaWiki\Search\SearchWidgets\DidYouMeanWidget\suggestionHtml().
ISearchResultSet::getTotalHits | ( | ) |
Some search modes return a total hit count for the query in the entire article database.
This may include pages in namespaces that would not be matched on the given settings.
Return null if no total hits number is supported.
Implemented in FauxSearchResultSet, SearchResultSet, and SqlSearchResultSet.
ISearchResultSet::hasInterwikiResults | ( | $type = self::SECONDARY_RESULTS | ) |
Check if there are results on other wikis.
int | $type |
Implemented in SearchResultSet.
ISearchResultSet::hasMoreResults | ( | ) |
Implemented in SearchResultSet.
ISearchResultSet::hasRewrittenQuery | ( | ) |
Some search modes will run an alternative query that it thinks gives a better result than the provided search.
Returns true if this has occurred.
NOTE: In practice this has only been applied when the original query returned no results. UI messages, such as search-rewritten
, have this assumption baked in.
Implemented in SearchResultSet.
Referenced by SpecialSearch\prevNextLinks(), and MediaWiki\Search\SearchWidgets\DidYouMeanWidget\render().
ISearchResultSet::hasSuggestion | ( | ) |
Some search modes return a suggested alternate term if there are no exact hits.
Returns true if there is one on this set.
Implemented in SearchResultSet.
Referenced by MediaWiki\Search\SearchWidgets\DidYouMeanWidget\render().
ISearchResultSet::numRows | ( | ) |
Implemented in SearchNearMatchResultSet, SearchResultSet, and SqlSearchResultSet.
ISearchResultSet::searchContainedSyntax | ( | ) |
Did the search contain search syntax? If so, Special:Search won't offer the user a link to a create a page named by the search string because the name would contain the search syntax.
Implemented in SearchResultSet.
ISearchResultSet::setAugmentedData | ( | $name, | |
$data | |||
) |
Sets augmented data for result set.
string | $name | Extra data item name |
array[] | $data | Extra data as PAGEID => data |
Referenced by SearchEngine\augmentSearchResults().
ISearchResultSet::shrink | ( | $limit | ) |
int | $limit | Shrink result set to $limit and flag if more results are available. |
Implemented in SearchResultSet.
const ISearchResultSet::INLINE_RESULTS = 1 |
Identifier for interwiki results that can be displayed even if no existing main wiki results exist.
Definition at line 23 of file ISearchResultSet.php.
const ISearchResultSet::SECONDARY_RESULTS = 0 |
Identifier for interwiki results that are displayed only together with existing main wiki results.
Definition at line 17 of file ISearchResultSet.php.