EventHubErrorOccurred Event
Occurs when an error happens during an index operation.

Namespace: GroupDocs.Search.Events
Assembly: GroupDocs.Search (in GroupDocs.Search.dll) Version: 21.3
Syntax
public event EventHandler<IndexErrorEventArgs> ErrorOccurred

Value

Type: SystemEventHandlerIndexErrorEventArgs
Examples
The example demonstrates how to use the event.
C#
string indexFolder = @"c:\MyIndex\";
string documentsFolder = @"c:\MyDocuments\";
string query = "Einstein";

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

// Subscribing to the event
index.Events.ErrorOccurred += (sender, args) =>
{
    Console.WriteLine(args.Message);
};

// Indexing documents from the specified folder
index.Add(documentsFolder);

// Searching in the index
SearchResult result = index.Search(query);
See Also