CirrusSearch
Elasticsearch-powered search for MediaWiki
Loading...
Searching...
No Matches
CirrusSearch\Elastica\ReindexTask Class Reference

Public Member Functions

 __construct (Client $client, $taskId)
 
 getId ()
 
 isComplete ( $check=false)
 
 cancel ()
 Cancel the in-progress reindex task.
 
 delete ()
 Delete the task.
 
 getResponse ()
 Get the final result of the reindexing task.
 
 getStatus ()
 

Constructor & Destructor Documentation

◆ __construct()

CirrusSearch\Elastica\ReindexTask::__construct ( Client $client,
$taskId )
Parameters
Client$client
string$taskId

Member Function Documentation

◆ cancel()

CirrusSearch\Elastica\ReindexTask::cancel ( )

Cancel the in-progress reindex task.

Returns
bool True if cancel was succesful

◆ delete()

CirrusSearch\Elastica\ReindexTask::delete ( )

Delete the task.

Returns
bool True if delete was successful, false otherwise. Throws Elastica NotFoundException for unknown task (already deleted?) or HttpException for communication failures.

◆ getId()

CirrusSearch\Elastica\ReindexTask::getId ( )
Returns
string

◆ getResponse()

CirrusSearch\Elastica\ReindexTask::getResponse ( )

Get the final result of the reindexing task.

Returns
ReindexResponse|null The result of the reindex, or null if the reindex is still running. self::getStatus must be used to update the task completion status.

◆ getStatus()

CirrusSearch\Elastica\ReindexTask::getStatus ( )
Returns
ReindexStatus|null The status of the reindex, or null on failure. Transport may also throw exceptions for network failures.

the task.status.slices array contains null for each incomplete child task. This fetches the children and merges their status in.

◆ isComplete()

CirrusSearch\Elastica\ReindexTask::isComplete ( $check = false)
Parameters
bool$checkWhen true queries the remote to see if the task is complete. Otherwise reports last requested status.
Returns
bool True if the reindex task is complete

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