CirrusSearch
Elasticsearch-powered search for MediaWiki
Loading...
Searching...
No Matches
CirrusSearch\CompletionRequestLog Class Reference
+ Inheritance diagram for CirrusSearch\CompletionRequestLog:
+ Collaboration diagram for CirrusSearch\CompletionRequestLog:

Public Member Functions

 __construct ( $description, $queryType, $extra=[], $namespaces=null)
 
 setResult (array $result, array $suggestionMetadataByDocId)
 
 getElasticTookMs ()
 
 isCachedResponse ()
 
 getLogVariables ()
 
 getRequests ()
 
 setTotalHits ( $totalHits)
 
 setSuggestTookMs ( $suggestTookMs)
 
 setPrefixTookMs ( $prefixTookMs)
 
 addIndex ( $indexName)
 Add an index used by this request.
 
- Public Member Functions inherited from CirrusSearch\BaseRequestLog
 __construct ( $description, $queryType, array $extra=[])
 
 start ()
 Called when the network request is started.
 
 finish ()
 Called when the network request has finished.
 
 getTookMs ()
 
 getDescription ()
 
 getQueryType ()
 
 formatDescription ()
 Perform a quick and dirty replacement for $this->description when it's not going through monolog.
 

Additional Inherited Members

- Protected Attributes inherited from CirrusSearch\BaseRequestLog
 $description
 
 $queryType
 
 $extra
 
 $startTime
 
 $endTime
 

Member Function Documentation

◆ addIndex()

CirrusSearch\CompletionRequestLog::addIndex ( $indexName)

Add an index used by this request.

Parameters
string$indexName

◆ getElasticTookMs()

CirrusSearch\CompletionRequestLog::getElasticTookMs ( )
Returns
int

Implements CirrusSearch\RequestLog.

◆ getLogVariables()

CirrusSearch\CompletionRequestLog::getLogVariables ( )
Returns
array

Implements CirrusSearch\RequestLog.

◆ getRequests()

CirrusSearch\CompletionRequestLog::getRequests ( )
Returns
array[]

Implements CirrusSearch\RequestLog.

◆ isCachedResponse()

CirrusSearch\CompletionRequestLog::isCachedResponse ( )
Returns
bool

Implements CirrusSearch\RequestLog.

◆ setPrefixTookMs()

CirrusSearch\CompletionRequestLog::setPrefixTookMs ( $prefixTookMs)
Parameters
int$prefixTookMs

◆ setResult()

CirrusSearch\CompletionRequestLog::setResult ( array $result,
array $suggestionMetadataByDocId )
Parameters
SearchSuggestion[]$resultThe set of suggestion results that will be returned to the user.
string[][]$suggestionMetadataByDocIdA map from elasticsearch document id to the completion profile that provided the highest score for that document id.

◆ setSuggestTookMs()

CirrusSearch\CompletionRequestLog::setSuggestTookMs ( $suggestTookMs)
Parameters
int$suggestTookMs

◆ setTotalHits()

CirrusSearch\CompletionRequestLog::setTotalHits ( $totalHits)
Parameters
int$totalHits

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