EventHubStatusChanged Event
Occurs when the index status changes.

Namespace: GroupDocs.Search.Events
Assembly: GroupDocs.Search (in GroupDocs.Search.dll) Version: 21.8
public event EventHandler<BaseIndexEventArgs> StatusChanged


Type: SystemEventHandlerBaseIndexEventArgs
The example demonstrates how to use the event.
string indexFolder = @"c:\MyIndex\";
string documentsFolder = @"c:\MyDocuments\";

// Creating an index
Index index = new Index(indexFolder);

// Subscribing to the event
index.Events.StatusChanged += (sender, args) =>
    if (args.Status != IndexStatus.InProgress)
        // A notification of the operation completion should be here

// Setting the flag for asynchronous indexing
IndexingOptions options = new IndexingOptions();
options.IsAsync = true;

// Asynchronous indexing documents from the specified folder
// The method terminates before the operation completes
index.Add(documentsFolder, options);
See Also