|
MediaWiki master
|
A set of SearchEngine results. More...
Inherits Countable, and IteratorAggregate.
Inherited by MediaWiki\Search\BaseSearchResultSet.

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. | |
| isApproximateTotalHits () | |
If getTotalHits() is supported determine whether this number is approximate or not. | |
| 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 implemented directly by extensions, extend BaseSearchResultSet instead.
Definition at line 17 of file ISearchResultSet.php.
| MediaWiki\Search\ISearchResultSet::augmentResult | ( | SearchResult | $result | ) |
Returns extra data for specific result and store it in SearchResult object.
| MediaWiki\Search\ISearchResultSet::extractResults | ( | ) |
Extract all the results in the result set as array.
Implemented in MediaWiki\Search\SearchResultSet, and MediaWiki\Search\SqlSearchResultSet.
Referenced by MediaWiki\Search\PerRowAugmentor\augmentAll().
| MediaWiki\Search\ISearchResultSet::extractTitles | ( | ) |
Extract all the titles in the result set.
Implemented in MediaWiki\Search\SearchResultSet.
| MediaWiki\Search\ISearchResultSet::getInterwikiResults | ( | $type = self::SECONDARY_RESULTS | ) |
Return a result set of hits on other (multiple) wikis associated with this one.
| int | $type |
Implemented in MediaWiki\Search\SearchResultSet.
| MediaWiki\Search\ISearchResultSet::getOffset | ( | ) |
| MediaWiki\Search\ISearchResultSet::getQueryAfterRewrite | ( | ) |
Implemented in MediaWiki\Search\SearchResultSet.
Referenced by MediaWiki\Search\SearchWidgets\DidYouMeanWidget\rewrittenHtml().
| MediaWiki\Search\ISearchResultSet::getQueryAfterRewriteSnippet | ( | ) |
Implemented in MediaWiki\Search\SearchResultSet.
Referenced by MediaWiki\Search\SearchWidgets\DidYouMeanWidget\rewrittenHtml().
| MediaWiki\Search\ISearchResultSet::getSuggestionQuery | ( | ) |
Implemented in MediaWiki\Search\SearchResultSet.
Referenced by MediaWiki\Search\SearchWidgets\DidYouMeanWidget\suggestionHtml().
| MediaWiki\Search\ISearchResultSet::getSuggestionSnippet | ( | ) |
Implemented in MediaWiki\Search\SearchResultSet.
Referenced by MediaWiki\Search\SearchWidgets\DidYouMeanWidget\suggestionHtml().
| MediaWiki\Search\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 MediaWiki\Search\FauxSearchResultSet, MediaWiki\Search\SearchResultSet, and MediaWiki\Search\SqlSearchResultSet.
| MediaWiki\Search\ISearchResultSet::hasInterwikiResults | ( | $type = self::SECONDARY_RESULTS | ) |
Check if there are results on other wikis.
| int | $type |
Implemented in MediaWiki\Search\SearchResultSet.
| MediaWiki\Search\ISearchResultSet::hasMoreResults | ( | ) |
Implemented in MediaWiki\Search\SearchResultSet.
| MediaWiki\Search\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 MediaWiki\Search\SearchResultSet.
Referenced by MediaWiki\Search\SearchWidgets\DidYouMeanWidget\render().
| MediaWiki\Search\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 MediaWiki\Search\SearchResultSet.
Referenced by MediaWiki\Search\SearchWidgets\DidYouMeanWidget\render().
| MediaWiki\Search\ISearchResultSet::isApproximateTotalHits | ( | ) |
If getTotalHits() is supported determine whether this number is approximate or not.
Some engine might perform optimizations that might lead to inaccurate total hits. If this happens such engine should return true.
Implemented in MediaWiki\Search\BaseSearchResultSet.
| MediaWiki\Search\ISearchResultSet::numRows | ( | ) |
Implemented in MediaWiki\Search\SearchNearMatchResultSet, MediaWiki\Search\SearchResultSet, and MediaWiki\Search\SqlSearchResultSet.
| MediaWiki\Search\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 MediaWiki\Search\SearchResultSet.
| MediaWiki\Search\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 MediaWiki\Search\SearchEngine\augmentSearchResults().
| MediaWiki\Search\ISearchResultSet::shrink | ( | $limit | ) |
| int | $limit | Shrink result set to $limit and flag if more results are available. |
Implemented in MediaWiki\Search\SearchResultSet.
| const MediaWiki\Search\ISearchResultSet::INLINE_RESULTS = 1 |
Identifier for interwiki results that can be displayed even if no existing main wiki results exist.
Definition at line 28 of file ISearchResultSet.php.
Referenced by MediaWiki\Search\SearchWidgets\BasicSearchResultSetWidget\render().
| const MediaWiki\Search\ISearchResultSet::SECONDARY_RESULTS = 0 |
Identifier for interwiki results that are displayed only together with existing main wiki results.
Definition at line 22 of file ISearchResultSet.php.
Referenced by MediaWiki\Search\SearchWidgets\BasicSearchResultSetWidget\render().