SearchPhaseCompleted
EventHub.SearchPhaseCompleted event
Occurs when the search phase is completed.
public event EventHandler<SearchPhaseEventArgs> SearchPhaseCompleted;
Examples
The example demonstrates how to use the event.
string indexFolder = @"c:\MyIndex\";
string documentsFolder = @"c:\MyDocuments\";
// Creating an index
Index index = new Index(indexFolder);
// Indexing documents from the specified folder
index.Add(documentsFolder);
// Subscribing to the event
index.Events.SearchPhaseCompleted += (sender, args) =>
{
Console.WriteLine("Search phase: " + args.SearchPhase);
Console.WriteLine("Words: " + args.Words.Length);
};
SearchOptions options = new SearchOptions();
options.UseSynonymSearch = true;
options.UseWordFormsSearch = true;
options.FuzzySearch.Enabled = true;
options.UseHomophoneSearch = true;
SearchResult result = index.Search("Einstein", options);
See Also
- class SearchPhaseEventArgs
- class EventHub
- namespace GroupDocs.Search.Events
- assembly GroupDocs.Search