Resume Index Operation


  • After an index has been paused using StopIndexOperation,
    use StartIndexOperation to resume the index.

  • When resuming the index from the client:
    The index is resumed on the preferred node only, and Not on all the database-group nodes.

  • When resuming the index from the Studio indexes list view:
    The index is resumed on the local node the browser is opened on, even if it is Not the preferred node.

  • In this page:


Resume index example

// Define the resume index operation, pass the index name
$resumeIndexOp = new StartIndexOperation("Orders/Totals");

// Execute the operation by passing it to Maintenance.Send
$store->maintenance()->send($resumeIndexOp);

// At this point:
// Index 'Orders/Totals' is resumed on the preferred node

// Can verify the index status on the preferred node by sending GetIndexingStatusOperation
/** @var IndexingStatus $indexingStatus */
$indexingStatus = $store->maintenance()->send(new GetIndexingStatusOperation());

$indexes = array_filter($indexingStatus->getIndexes()->getArrayCopy(), function ($v, $k) {
    return $v->getName() == "Orders/Totals";
});
/** @var IndexingStatus $index */
$index = $indexes[0];

$this->assertTrue($index->getStatus()->isRunning());

Syntax

// class name begins with "Start" but this is still the "Resume" operation
StartIndexOperation(?string $indexName)
Parameters Type Description
$indexName ?string Name of an index to resume