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

Helper class to build ArrayCirrusSearchResult instances. More...

Public Member Functions

 __construct (Title $title, $docId)
 
 build ()
 
 reset (Title $title, $docId)
 Reset the current builder to reuse its instance.
 
 score ( $score)
 
 explanation (array $explanation)
 
 textSnippet ( $textSnippet)
 
 textSnippetField ( $textSnippetField)
 
 titleSnippet ( $titleSnippet)
 
 titleSnippetField ( $titleSnippetField)
 
 redirectSnippet ( $redirectSnippet)
 
 redirectSnippetField ( $redirectSnippetField)
 
 redirectTitle ( $redirectTitle)
 
 sectionSnippet ( $sectionSnippet)
 
 sectionSnippetField ( $sectionSnippetField)
 
 sectionTitle (Title $sectionTitle)
 
 categorySnippet ( $categorySnippet)
 
 categorySnippetField ( $categorySnippetField)
 
 timestamp (MWTimestamp $timestamp)
 
 wordCount ( $wordCount)
 
 byteSize ( $byteSize)
 
 interwikiNamespaceText ( $interwikiNamespaceText)
 
 fileMatch ( $fileMatch)
 
 addExtraField (string $name, $value)
 

Detailed Description

Helper class to build ArrayCirrusSearchResult instances.

Constructor & Destructor Documentation

◆ __construct()

CirrusSearch\Search\CirrusSearchResultBuilder::__construct ( Title $title,
$docId )
Parameters
Title$title
string$docId

Member Function Documentation

◆ addExtraField()

CirrusSearch\Search\CirrusSearchResultBuilder::addExtraField ( string $name,
$value )
Parameters
string$name
mixed$value

◆ build()

CirrusSearch\Search\CirrusSearchResultBuilder::build ( )
Returns
ArrayCirrusSearchResult

◆ byteSize()

CirrusSearch\Search\CirrusSearchResultBuilder::byteSize ( $byteSize)
Parameters
int$byteSize
Returns
self

◆ categorySnippet()

CirrusSearch\Search\CirrusSearchResultBuilder::categorySnippet ( $categorySnippet)
Parameters
string$categorySnippet
Returns
CirrusSearchResultBuilder

◆ categorySnippetField()

CirrusSearch\Search\CirrusSearchResultBuilder::categorySnippetField ( $categorySnippetField)
Parameters
string$categorySnippetField
Returns
CirrusSearchResultBuilder

◆ explanation()

CirrusSearch\Search\CirrusSearchResultBuilder::explanation ( array $explanation)
Parameters
array$explanation
Returns
self

◆ fileMatch()

CirrusSearch\Search\CirrusSearchResultBuilder::fileMatch ( $fileMatch)
Parameters
bool$fileMatch
Returns
self

◆ interwikiNamespaceText()

CirrusSearch\Search\CirrusSearchResultBuilder::interwikiNamespaceText ( $interwikiNamespaceText)
Parameters
string$interwikiNamespaceText
Returns
self

◆ redirectSnippet()

CirrusSearch\Search\CirrusSearchResultBuilder::redirectSnippet ( $redirectSnippet)
Parameters
string$redirectSnippet
Returns
self

◆ redirectSnippetField()

CirrusSearch\Search\CirrusSearchResultBuilder::redirectSnippetField ( $redirectSnippetField)
Parameters
string$redirectSnippetField
Returns
self

◆ redirectTitle()

CirrusSearch\Search\CirrusSearchResultBuilder::redirectTitle ( $redirectTitle)
Parameters
string$redirectTitle
Returns
self

◆ reset()

CirrusSearch\Search\CirrusSearchResultBuilder::reset ( Title $title,
$docId )

Reset the current builder to reuse its instance.

Parameters
Title$title
string$docId
Returns
self

◆ score()

CirrusSearch\Search\CirrusSearchResultBuilder::score ( $score)
Parameters
float$score
Returns
self

◆ sectionSnippet()

CirrusSearch\Search\CirrusSearchResultBuilder::sectionSnippet ( $sectionSnippet)
Parameters
string$sectionSnippet
Returns
self

◆ sectionSnippetField()

CirrusSearch\Search\CirrusSearchResultBuilder::sectionSnippetField ( $sectionSnippetField)
Parameters
string$sectionSnippetField
Returns
self

◆ sectionTitle()

CirrusSearch\Search\CirrusSearchResultBuilder::sectionTitle ( Title $sectionTitle)
Parameters
Title$sectionTitle
Returns
self

◆ textSnippet()

CirrusSearch\Search\CirrusSearchResultBuilder::textSnippet ( $textSnippet)
Parameters
string$textSnippet
Returns
self

◆ textSnippetField()

CirrusSearch\Search\CirrusSearchResultBuilder::textSnippetField ( $textSnippetField)
Parameters
string$textSnippetField
Returns
self

◆ timestamp()

CirrusSearch\Search\CirrusSearchResultBuilder::timestamp ( MWTimestamp $timestamp)
Parameters
MWTimestamp$timestamp
Returns
self

◆ titleSnippet()

CirrusSearch\Search\CirrusSearchResultBuilder::titleSnippet ( $titleSnippet)
Parameters
string$titleSnippet
Returns
self

◆ titleSnippetField()

CirrusSearch\Search\CirrusSearchResultBuilder::titleSnippetField ( $titleSnippetField)
Parameters
string$titleSnippetField
Returns
self

◆ wordCount()

CirrusSearch\Search\CirrusSearchResultBuilder::wordCount ( $wordCount)
Parameters
int$wordCount
Returns
self

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