|
MediaWiki master
|
Inherits MediaWiki\Search\BaseSearchResultSet.
Inherited by MediaWiki\Search\FauxSearchResultSet, MediaWiki\Search\SearchNearMatchResultSet, and MediaWiki\Search\SqlSearchResultSet.

Public Member Functions | |
| __construct ( $containedSyntax=false, $hasMoreResults=false) | |
| count () | |
| 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. | |
| 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. | |
| shrink ( $limit) | |
Public Member Functions inherited from MediaWiki\Search\BaseSearchResultSet | |
| free () | |
| Frees the result set, if applicable. | |
| 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.
| |
| next () | |
| Fetches next search result, or false. | |
| rewind () | |
| Rewind result set back to beginning. | |
| termMatches () | |
| Fetch an array of regular expression fragments for matching the search terms as parsed by this engine in a text extract. | |
Public Member Functions inherited from MediaWiki\Search\ISearchResultSet | |
| augmentResult (SearchResult $result) | |
| Returns extra data for specific result and store it in SearchResult object. | |
| getOffset () | |
| setAugmentedData ( $name, $data) | |
| Sets augmented data for result set. | |
Protected Attributes | |
| bool | $containedSyntax = false |
| SearchResult[] | $results |
| Cache of results - serialization of the result iterator as an array. | |
Additional Inherited Members | |
Public Attributes inherited from MediaWiki\Search\ISearchResultSet | |
| 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. | |
Definition at line 18 of file SearchResultSet.php.
| MediaWiki\Search\SearchResultSet::__construct | ( | $containedSyntax = false, | |
| $hasMoreResults = false ) |
| bool | $containedSyntax | True when query is not requesting a simple term match |
| bool | $hasMoreResults | True when there are more pages of search results available. |
Definition at line 50 of file SearchResultSet.php.
References MediaWiki\Search\SearchResultSet\$containedSyntax, MediaWiki\Search\SearchResultSet\hasMoreResults(), and wfDeprecated().
|
final |
Definition at line 66 of file SearchResultSet.php.
Referenced by MediaWiki\Search\FauxSearchResultSet\__construct(), and MediaWiki\Search\SearchResultSet\numRows().
| MediaWiki\Search\SearchResultSet::extractResults | ( | ) |
Extract all the results in the result set as array.
Implements MediaWiki\Search\ISearchResultSet.
Reimplemented in MediaWiki\Search\SqlSearchResultSet.
Definition at line 199 of file SearchResultSet.php.
| MediaWiki\Search\SearchResultSet::extractTitles | ( | ) |
Extract all the titles in the result set.
Implements MediaWiki\Search\ISearchResultSet.
Definition at line 219 of file SearchResultSet.php.
References MediaWiki\Search\SearchResult\getTitle().
| MediaWiki\Search\SearchResultSet::getInterwikiResults | ( | $type = self::SECONDARY_RESULTS | ) |
Return a result set of hits on other (multiple) wikis associated with this one.
| int | $type |
Implements MediaWiki\Search\ISearchResultSet.
Definition at line 142 of file SearchResultSet.php.
| MediaWiki\Search\SearchResultSet::getQueryAfterRewrite | ( | ) |
Implements MediaWiki\Search\ISearchResultSet.
Definition at line 99 of file SearchResultSet.php.
| MediaWiki\Search\SearchResultSet::getQueryAfterRewriteSnippet | ( | ) |
Implements MediaWiki\Search\ISearchResultSet.
Definition at line 108 of file SearchResultSet.php.
| MediaWiki\Search\SearchResultSet::getSuggestionQuery | ( | ) |
Implements MediaWiki\Search\ISearchResultSet.
Definition at line 125 of file SearchResultSet.php.
| MediaWiki\Search\SearchResultSet::getSuggestionSnippet | ( | ) |
Implements MediaWiki\Search\ISearchResultSet.
Definition at line 132 of file SearchResultSet.php.
| MediaWiki\Search\SearchResultSet::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.
Implements MediaWiki\Search\ISearchResultSet.
Reimplemented in MediaWiki\Search\FauxSearchResultSet, and MediaWiki\Search\SqlSearchResultSet.
Definition at line 80 of file SearchResultSet.php.
| MediaWiki\Search\SearchResultSet::hasInterwikiResults | ( | $type = self::SECONDARY_RESULTS | ) |
Check if there are results on other wikis.
| int | $type |
Implements MediaWiki\Search\ISearchResultSet.
Definition at line 152 of file SearchResultSet.php.
| MediaWiki\Search\SearchResultSet::hasMoreResults | ( | ) |
Implements MediaWiki\Search\ISearchResultSet.
Definition at line 169 of file SearchResultSet.php.
Referenced by MediaWiki\Search\SearchResultSet\__construct().
| MediaWiki\Search\SearchResultSet::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.
Implements MediaWiki\Search\ISearchResultSet.
Definition at line 91 of file SearchResultSet.php.
| MediaWiki\Search\SearchResultSet::hasSuggestion | ( | ) |
Some search modes return a suggested alternate term if there are no exact hits.
Returns true if there is one on this set.
Implements MediaWiki\Search\ISearchResultSet.
Definition at line 118 of file SearchResultSet.php.
| MediaWiki\Search\SearchResultSet::numRows | ( | ) |
Implements MediaWiki\Search\ISearchResultSet.
Reimplemented in MediaWiki\Search\SearchNearMatchResultSet, and MediaWiki\Search\SqlSearchResultSet.
Definition at line 62 of file SearchResultSet.php.
References MediaWiki\Search\SearchResultSet\count().
| MediaWiki\Search\SearchResultSet::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.
Implements MediaWiki\Search\ISearchResultSet.
Definition at line 162 of file SearchResultSet.php.
| MediaWiki\Search\SearchResultSet::shrink | ( | $limit | ) |
| int | $limit | Shrink result set to $limit and flag if more results are available. |
Implements MediaWiki\Search\ISearchResultSet.
Definition at line 177 of file SearchResultSet.php.
|
protected |
Definition at line 23 of file SearchResultSet.php.
Referenced by MediaWiki\Search\SearchResultSet\__construct().
|
protected |
Cache of results - serialization of the result iterator as an array.
Definition at line 37 of file SearchResultSet.php.
Referenced by MediaWiki\Search\FauxSearchResultSet\__construct(), and MediaWiki\Search\SqlSearchResultSet\extractResults().