MediaWiki  1.34.0
ISearchResultSet.php
Go to the documentation of this file.
1 <?php
2 
11 interface ISearchResultSet extends \Countable, \IteratorAggregate {
16  const SECONDARY_RESULTS = 0;
17 
22  const INLINE_RESULTS = 1;
23 
27  public function numRows();
28 
39  public function getTotalHits();
40 
48  public function hasRewrittenQuery();
49 
54  public function getQueryAfterRewrite();
55 
60  public function getQueryAfterRewriteSnippet();
61 
68  public function hasSuggestion();
69 
73  public function getSuggestionQuery();
74 
78  public function getSuggestionSnippet();
79 
86  public function getInterwikiResults( $type = self::SECONDARY_RESULTS );
87 
94  public function hasInterwikiResults( $type = self::SECONDARY_RESULTS );
95 
102  public function searchContainedSyntax();
103 
107  public function hasMoreResults();
108 
113  public function shrink( $limit );
114 
119  public function extractResults();
120 
125  public function extractTitles();
126 
132  public function setAugmentedData( $name, $data );
133 
138  public function augmentResult( SearchResult $result );
139 
146  public function getOffset();
147 }
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:11
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:22
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:16
ISearchResultSet\hasMoreResults
hasMoreResults()
$type
$type
Definition: testCompression.php:48