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

Public Member Functions

 __construct (\Elastica\Client $client, $description, $queryType, array $extra=[], ?array $namespaces=null)
 
 setCachedResult (array $extra)
 
 finish ()
 Called when the network request has finished.
 
 isCachedResponse ()
 
 getElasticTookMs ()
 
 getLogVariables ()
 
 getRequests ()
 
- Public Member Functions inherited from CirrusSearch\BaseRequestLog
 __construct ( $description, $queryType, array $extra=[])
 
 start ()
 Called when the network request is started.
 
 getTookMs ()
 
 getDescription ()
 
 getQueryType ()
 
 formatDescription ()
 Perform a quick and dirty replacement for $this->description when it's not going through monolog.
 

Protected Member Functions

 extractRequestVariables ( $query)
 
 extractResponseVariables ( $responseData)
 
 extractHits (array $responseData)
 

Protected Attributes

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

Constructor & Destructor Documentation

◆ __construct()

CirrusSearch\SearchRequestLog::__construct ( \Elastica\Client $client,
$description,
$queryType,
array $extra = [],
?array $namespaces = null )
Parameters
\Elastica\Client$client
string$description
string$queryType
array$extra
int[] | null$namespaceslist of known namespaces to query, null if unknown or inappropriate

Member Function Documentation

◆ extractHits()

CirrusSearch\SearchRequestLog::extractHits ( array $responseData)
protected
Parameters
array$responseData
Returns
array[]

◆ extractRequestVariables()

CirrusSearch\SearchRequestLog::extractRequestVariables ( $query)
protected
Parameters
array$query
Returns
array

Reimplemented in CirrusSearch\MultiSearchRequestLog.

◆ extractResponseVariables()

CirrusSearch\SearchRequestLog::extractResponseVariables ( $responseData)
protected
Parameters
array$responseData
Returns
array

◆ finish()

CirrusSearch\SearchRequestLog::finish ( )

Called when the network request has finished.

Reimplemented from CirrusSearch\BaseRequestLog.

◆ getElasticTookMs()

CirrusSearch\SearchRequestLog::getElasticTookMs ( )
Returns
int

Implements CirrusSearch\RequestLog.

◆ getLogVariables()

CirrusSearch\SearchRequestLog::getLogVariables ( )
Returns
array

Implements CirrusSearch\RequestLog.

Reimplemented in CirrusSearch\MultiSearchRequestLog.

◆ getRequests()

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

Implements CirrusSearch\RequestLog.

Reimplemented in CirrusSearch\MultiSearchRequestLog.

◆ isCachedResponse()

CirrusSearch\SearchRequestLog::isCachedResponse ( )
Returns
bool

Implements CirrusSearch\RequestLog.

◆ setCachedResult()

CirrusSearch\SearchRequestLog::setCachedResult ( array $extra)
Parameters
string[]$extra

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