MediaWiki master
ISearchResultSet.php
Go to the documentation of this file.
1<?php
2
5
15interface ISearchResultSet extends \Countable, \IteratorAggregate {
20 public const SECONDARY_RESULTS = 0;
21
26 public const INLINE_RESULTS = 1;
27
31 public function numRows();
32
43 public function getTotalHits();
44
53 public function isApproximateTotalHits(): bool;
54
66 public function hasRewrittenQuery();
67
72 public function getQueryAfterRewrite();
73
81 public function getQueryAfterRewriteSnippet();
82
89 public function hasSuggestion();
90
94 public function getSuggestionQuery();
95
103 public function getSuggestionSnippet();
104
111 public function getInterwikiResults( $type = self::SECONDARY_RESULTS );
112
119 public function hasInterwikiResults( $type = self::SECONDARY_RESULTS );
120
127 public function searchContainedSyntax();
128
132 public function hasMoreResults();
133
138 public function shrink( $limit );
139
144 public function extractResults();
145
150 public function extractTitles();
151
157 public function setAugmentedData( $name, $data );
158
162 public function augmentResult( SearchResult $result );
163
170 public function getOffset();
171}
Represents a title within MediaWiki.
Definition Title.php:70
An abstract base class representing a search engine result.
Marks HTML that shouldn't be escaped.
Definition HtmlArmor.php:18
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.