EventHub

EventHub class

Provides index events for subscribing.

public class EventHub

Events

Name Description
event ErrorOccurred Occurs when an error occurs during an index operation.
event FileIndexing Occurs when a document is going to be indexed.
event ImagePreparing Occurs when an image is going to be prepared for indexing.
event OperationFinished Occurs when an index operation is finished.
event OperationProgressChanged Occurs when the progress of the indexing or update operation changes.
event OptimizationProgressChanged Occurs when the progress of the optimization operation changes.
event PasswordRequired Occurs when a document requires password for opening.
event SearchPhaseCompleted Occurs when the search phase is completed.
event StatusChanged Occurs when the index status changes.

Remarks

Learn more

Examples

The example demonstrates a typical usage of the interface.

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