Resume Index Operation
-
After an index has been paused using StopIndexOperation,
useStartIndexOperation
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
var 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 = store.Maintenance.Send(new GetIndexingStatusOperation());
var index = indexingStatus.Indexes.FirstOrDefault(x => x.Name == "Orders/Totals");
Assert.Equal(IndexRunningStatus.Running, index.Status);
// Define the resume index operation, pass the index name
var resumeIndexOp = new StartIndexOperation("Orders/Totals");
// Execute the operation by passing it to Maintenance.SendAsync
await store.Maintenance.SendAsync(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 = await store.Maintenance.SendAsync(new GetIndexingStatusOperation());
var index = indexingStatus.Indexes.FirstOrDefault(x => x.Name == "Orders/Totals");
Assert.Equal(IndexRunningStatus.Running, index.Status);
Syntax
// class name has "Start", but this is ok, this is the "Resume" operation
public StartIndexOperation(string indexName)
Parameters | Type | Description |
---|---|---|
indexName | string |
Name of an index to resume |