MediaWiki  master
ISearchResultSet.php
Go to the documentation of this file.
1 <?php
2 
12 interface ISearchResultSet extends \Countable, \IteratorAggregate {
17  public const SECONDARY_RESULTS = 0;
18 
23  public const INLINE_RESULTS = 1;
24 
28  public function numRows();
29 
40  public function getTotalHits();
41 
53  public function hasRewrittenQuery();
54 
59  public function getQueryAfterRewrite();
60 
68  public function getQueryAfterRewriteSnippet();
69 
76  public function hasSuggestion();
77 
81  public function getSuggestionQuery();
82 
90  public function getSuggestionSnippet();
91 
98  public function getInterwikiResults( $type = self::SECONDARY_RESULTS );
99 
106  public function hasInterwikiResults( $type = self::SECONDARY_RESULTS );
107 
114  public function searchContainedSyntax();
115 
119  public function hasMoreResults();
120 
125  public function shrink( $limit );
126 
131  public function extractResults();
132 
137  public function extractTitles();
138 
144  public function setAugmentedData( $name, $data );
145 
150  public function augmentResult( SearchResult $result );
151 
158  public function getOffset();
159 }
ISearchResultSet\hasSuggestion
hasSuggestion()
Some search modes return a suggested alternate term if there are no exact hits.
ISearchResultSet\hasRewrittenQuery
hasRewrittenQuery()
Some search modes will run an alternative query that it thinks gives a better result than the provide...
ISearchResultSet\numRows
numRows()
ISearchResultSet\extractResults
extractResults()
Extract all the results in the result set as array.
ISearchResultSet\shrink
shrink( $limit)
ISearchResultSet\augmentResult
augmentResult(SearchResult $result)
Returns extra data for specific result and store it in SearchResult object.
ISearchResultSet\getInterwikiResults
getInterwikiResults( $type=self::SECONDARY_RESULTS)
Return a result set of hits on other (multiple) wikis associated with this one.
ISearchResultSet\getQueryAfterRewrite
getQueryAfterRewrite()
ISearchResultSet\getSuggestionSnippet
getSuggestionSnippet()
ISearchResultSet\searchContainedSyntax
searchContainedSyntax()
Did the search contain search syntax? If so, Special:Search won't offer the user a link to a create a...
SearchResult
NOTE: this class is being refactored into an abstract base class.
Definition: SearchResult.php:38
ISearchResultSet\getQueryAfterRewriteSnippet
getQueryAfterRewriteSnippet()
ISearchResultSet\extractTitles
extractTitles()
Extract all the titles in the result set.
ISearchResultSet\setAugmentedData
setAugmentedData( $name, $data)
Sets augmented data for result set.
ISearchResultSet
A set of SearchEngine results.
Definition: ISearchResultSet.php:12
ISearchResultSet\INLINE_RESULTS
const INLINE_RESULTS
Identifier for interwiki results that can be displayed even if no existing main wiki results exist.
Definition: ISearchResultSet.php:23
ISearchResultSet\getTotalHits
getTotalHits()
Some search modes return a total hit count for the query in the entire article database.
ISearchResultSet\getOffset
getOffset()
ISearchResultSet\getSuggestionQuery
getSuggestionQuery()
ISearchResultSet\hasInterwikiResults
hasInterwikiResults( $type=self::SECONDARY_RESULTS)
Check if there are results on other wikis.
ISearchResultSet\SECONDARY_RESULTS
const SECONDARY_RESULTS
Identifier for interwiki results that are displayed only together with existing main wiki results.
Definition: ISearchResultSet.php:17
ISearchResultSet\hasMoreResults
hasMoreResults()
$type
$type
Definition: testCompression.php:52