MediaWiki REL1_39
ISearchResultSet.php
Go to the documentation of this file.
1<?php
2
12interface 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}
NOTE: this class is being refactored into an abstract base class.
A set of SearchEngine results.
searchContainedSyntax()
Did the search contain search syntax? If so, Special:Search won't offer the user a link to a create a...
setAugmentedData( $name, $data)
Sets augmented data for result set.
hasInterwikiResults( $type=self::SECONDARY_RESULTS)
Check if there are results on other wikis.
extractResults()
Extract all the results in the result set as array.
const INLINE_RESULTS
Identifier for interwiki results that can be displayed even if no existing main wiki results exist.
const SECONDARY_RESULTS
Identifier for interwiki results that are displayed only together with existing main wiki results.
hasRewrittenQuery()
Some search modes will run an alternative query that it thinks gives a better result than the provide...
hasSuggestion()
Some search modes return a suggested alternate term if there are no exact hits.
extractTitles()
Extract all the titles in the result set.
augmentResult(SearchResult $result)
Returns extra data for specific result and store it in SearchResult object.
getInterwikiResults( $type=self::SECONDARY_RESULTS)
Return a result set of hits on other (multiple) wikis associated with this one.
getTotalHits()
Some search modes return a total hit count for the query in the entire article database.