CirrusSearch
Elasticsearch-powered search for MediaWiki
Loading...
Searching...
No Matches
CirrusSearch\Search\CirrusSearchResult Class Reference

Base class for SearchResult. More...

+ Inheritance diagram for CirrusSearch\Search\CirrusSearchResult:
+ Collaboration diagram for CirrusSearch\Search\CirrusSearchResult:

Public Member Functions

 __construct (Title $title)
 
 isBrokenTitle ()
 Check if this is result points to an invalid title.
 
 isMissingRevision ()
 Check if target page is missing, happens when index is out of date.
 
 getTitle ()
 
 getFile ()
 Get the file for this page, if one exists.
 
 getDocId ()
 
 getScore ()
 
 getExplanation ()
 

Protected Member Functions

 initFromTitle ( $title)
 Initialize from a Title and if possible initializes a corresponding File.
 
 initText ()
 Lazy initialization of article text from DB.
 
 containsHighlight (string $text)
 
 clearRedirectTitle ()
 Clear any redirect match so it won't be part of the result.
 

Detailed Description

Base class for SearchResult.

Constructor & Destructor Documentation

◆ __construct()

CirrusSearch\Search\CirrusSearchResult::__construct ( Title $title)
Parameters
Title$title

Member Function Documentation

◆ clearRedirectTitle()

CirrusSearch\Search\CirrusSearchResult::clearRedirectTitle ( )
abstractprotected

Clear any redirect match so it won't be part of the result.

Returns
bool True if the redirect was the only snippet available for this result.

Reimplemented in CirrusSearch\Search\ArrayCirrusSearchResult, and CirrusSearch\Search\Result.

◆ containsHighlight()

CirrusSearch\Search\CirrusSearchResult::containsHighlight ( string $text)
protected
Parameters
string$textA snippet from the search highlighter
Returns
bool True when the string contains highlight markers

◆ getDocId()

CirrusSearch\Search\CirrusSearchResult::getDocId ( )
abstract

◆ getExplanation()

CirrusSearch\Search\CirrusSearchResult::getExplanation ( )
abstract

◆ getFile()

CirrusSearch\Search\CirrusSearchResult::getFile ( )
final

Get the file for this page, if one exists.

Returns
File|null

◆ getScore()

CirrusSearch\Search\CirrusSearchResult::getScore ( )
abstract

◆ getTitle()

CirrusSearch\Search\CirrusSearchResult::getTitle ( )
final
Returns
Title

◆ initFromTitle()

CirrusSearch\Search\CirrusSearchResult::initFromTitle ( $title)
finalprotected

Initialize from a Title and if possible initializes a corresponding File.

Parameters
Title$title

◆ initText()

CirrusSearch\Search\CirrusSearchResult::initText ( )
finalprotected

Lazy initialization of article text from DB.

Returns
never

◆ isBrokenTitle()

CirrusSearch\Search\CirrusSearchResult::isBrokenTitle ( )
final

Check if this is result points to an invalid title.

Returns
bool

◆ isMissingRevision()

CirrusSearch\Search\CirrusSearchResult::isMissingRevision ( )
final

Check if target page is missing, happens when index is out of date.

Returns
bool

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