MediaWiki master
ISearchResultSet.php
Go to the documentation of this file.
1<?php
2
4
14interface ISearchResultSet extends \Countable, \IteratorAggregate {
19 public const SECONDARY_RESULTS = 0;
20
25 public const INLINE_RESULTS = 1;
26
30 public function numRows();
31
42 public function getTotalHits();
43
52 public function isApproximateTotalHits(): bool;
53
65 public function hasRewrittenQuery();
66
71 public function getQueryAfterRewrite();
72
80 public function getQueryAfterRewriteSnippet();
81
88 public function hasSuggestion();
89
93 public function getSuggestionQuery();
94
102 public function getSuggestionSnippet();
103
110 public function getInterwikiResults( $type = self::SECONDARY_RESULTS );
111
118 public function hasInterwikiResults( $type = self::SECONDARY_RESULTS );
119
126 public function searchContainedSyntax();
127
131 public function hasMoreResults();
132
137 public function shrink( $limit );
138
143 public function extractResults();
144
149 public function extractTitles();
150
156 public function setAugmentedData( $name, $data );
157
161 public function augmentResult( SearchResult $result );
162
169 public function getOffset();
170}
Represents a title within MediaWiki.
Definition Title.php:78
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.
isApproximateTotalHits()
If getTotalHits() is supported determine whether this number is approximate or not.
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.