MediaWiki REL1_34
ISearchResultSet.php
Go to the documentation of this file.
1<?php
2
11interface ISearchResultSet extends \Countable, \IteratorAggregate {
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}
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.