MediaWiki  1.27.2
SearchResultSet Class Reference
Inheritance diagram for SearchResultSet:

Public Member Functions

 __construct ($containedSyntax=false)
 
 free ()
 Frees the result set, if applicable. More...
 
 getInterwikiResults ($type=self::SECONDARY_RESULTS)
 Return a result set of hits on other (multiple) wikis associated with this one. More...
 
 getQueryAfterRewrite ()
 
 getQueryAfterRewriteSnippet ()
 
 getSuggestionQuery ()
 
 getSuggestionSnippet ()
 
 getTotalHits ()
 Some search modes return a total hit count for the query in the entire article database. More...
 
 hasInterwikiResults ($type=self::SECONDARY_RESULTS)
 Check if there are results on other wikis. More...
 
 hasRewrittenQuery ()
 Some search modes will run an alternative query that it thinks gives a better result than the provided search. More...
 
 hasSuggestion ()
 Some search modes return a suggested alternate term if there are no exact hits. More...
 
 next ()
 Fetches next search result, or false. More...
 
 numRows ()
 
 rewind ()
 Rewind result set back to begining. More...
 
 searchContainedSyntax ()
 Did the search contain search syntax? If so, Special:Search won't offer the user a link to a create a page named by the search string because the name would contain the search syntax. More...
 
 termMatches ()
 Fetch an array of regular expression fragments for matching the search terms as parsed by this engine in a text extract. More...
 

Protected Attributes

 $containedSyntax = false
 Types of interwiki results. More...
 

Detailed Description

Definition at line 27 of file SearchResultSet.php.

Constructor & Destructor Documentation

SearchResultSet::__construct (   $containedSyntax = false)

Definition at line 45 of file SearchResultSet.php.

References $containedSyntax.

Member Function Documentation

SearchResultSet::free ( )

Frees the result set, if applicable.

Definition at line 166 of file SearchResultSet.php.

SearchResultSet::getInterwikiResults (   $type = self::SECONDARY_RESULTS)

Return a result set of hits on other (multiple) wikis associated with this one.

Returns
SearchResultSet[]

Definition at line 134 of file SearchResultSet.php.

SearchResultSet::getQueryAfterRewrite ( )
Returns
string|null The search the query was internally rewritten to, or null when the result of the original query was returned.

Definition at line 93 of file SearchResultSet.php.

Referenced by SpecialSearch\getDidYouMeanRewrittenHtml().

SearchResultSet::getQueryAfterRewriteSnippet ( )
Returns
string|null Same as self::getQueryAfterRewrite(), but in HTML and with changes highlighted. Null when the query was not rewritten.

Definition at line 101 of file SearchResultSet.php.

Referenced by SpecialSearch\getDidYouMeanRewrittenHtml().

SearchResultSet::getSuggestionQuery ( )
Returns
string|null Suggested query, null if none

Definition at line 118 of file SearchResultSet.php.

Referenced by SpecialSearch\getDidYouMeanHtml().

SearchResultSet::getSuggestionSnippet ( )
Returns
string HTML highlighted suggested query, '' if none

Definition at line 125 of file SearchResultSet.php.

Referenced by SpecialSearch\getDidYouMeanHtml().

SearchResultSet::getTotalHits ( )

Some search modes return a total hit count for the query in the entire article database.

This may include pages in namespaces that would not be matched on the given settings.

Return null if no total hits number is supported.

Returns
int

Definition at line 74 of file SearchResultSet.php.

SearchResultSet::hasInterwikiResults (   $type = self::SECONDARY_RESULTS)

Check if there are results on other wikis.

Returns
bool

Definition at line 143 of file SearchResultSet.php.

SearchResultSet::hasRewrittenQuery ( )

Some search modes will run an alternative query that it thinks gives a better result than the provided search.

Returns true if this has occured.

Returns
bool

Definition at line 85 of file SearchResultSet.php.

SearchResultSet::hasSuggestion ( )

Some search modes return a suggested alternate term if there are no exact hits.

Returns true if there is one on this set.

Returns
bool

Definition at line 111 of file SearchResultSet.php.

Referenced by SpecialSearch\shouldRunSuggestedQuery().

SearchResultSet::next ( )

Fetches next search result, or false.

STUB

Returns
SearchResult

Definition at line 153 of file SearchResultSet.php.

SearchResultSet::numRows ( )

Definition at line 60 of file SearchResultSet.php.

Referenced by SpecialSearch\shouldRunSuggestedQuery().

SearchResultSet::rewind ( )

Rewind result set back to begining.

Definition at line 160 of file SearchResultSet.php.

SearchResultSet::searchContainedSyntax ( )

Did the search contain search syntax? If so, Special:Search won't offer the user a link to a create a page named by the search string because the name would contain the search syntax.

Returns
bool

Definition at line 176 of file SearchResultSet.php.

References $containedSyntax.

Referenced by SpecialSearch\shouldRunSuggestedQuery().

SearchResultSet::termMatches ( )

Fetch an array of regular expression fragments for matching the search terms as parsed by this engine in a text extract.

STUB

Returns
array

Definition at line 56 of file SearchResultSet.php.

Member Data Documentation

SearchResultSet::$containedSyntax = false
protected

Types of interwiki results.

Definition at line 43 of file SearchResultSet.php.

Referenced by __construct(), SpecialSearchTestMockResultSet\__construct(), and searchContainedSyntax().


The documentation for this class was generated from the following file: