Go to the documentation of this file.
58 if ( static::class === self::class ) {
69 return $this->
count();
183 if ( $this->
count() > $limit ) {
189 if ( is_array( $this->results ) ) {
190 $this->results = array_slice( $this->results, 0, $limit );
192 throw new \UnexpectedValueException(
193 "When overriding result store extending classes must "
194 .
" also override " . __METHOD__ );
204 if ( is_null( $this->results ) ) {
211 while ( ( $result = $this->
next() ) !=
false ) {
212 $this->results[] = $result;
224 if ( is_null( $this->titles ) ) {
229 $this->titles = array_map(
231 return $result->getTitle();
rewind()
Rewind result set back to beginning.
__construct( $containedSyntax=false, $hasMoreResults=false)
getInterwikiResults( $type=self::SECONDARY_RESULTS)
Return a result set of hits on other (multiple) wikis associated with this one.
searchContainedSyntax()
Did the search contain search syntax? If so, Special:Search won't offer the user a link to a create a...
BaseSearchResultSet is the base class that must be extended by SearchEngine search result set impleme...
next()
Fetches next search result, or false.
Title[] $titles
Cache of titles.
NOTE: this class is being refactored into an abstract base class.
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Throws a warning that $function is deprecated.
hasSuggestion()
Some search modes return a suggested alternate term if there are no exact hits.
extractResults()
Extract all the results in the result set as array.
getTotalHits()
Some search modes return a total hit count for the query in the entire article database.
hasRewrittenQuery()
Some search modes will run an alternative query that it thinks gives a better result than the provide...
Represents a title within MediaWiki.
hasInterwikiResults( $type=self::SECONDARY_RESULTS)
Check if there are results on other wikis.
boolean $hasMoreResults
True when there are more pages of search results available.
trait SearchResultSetTrait
Trait useful for SearchResultSet implementations.
getQueryAfterRewriteSnippet()
SearchResult[] $results
Cache of results - serialization of the result iterator as an array.
extractTitles()
Extract all the titles in the result set.