SearchReport Class |
Namespace: GroupDocs.Search.Common
The SearchReport type exposes the following members.
Name | Description | |
---|---|---|
![]() | DocumentCount |
Gets the number of documents found.
|
![]() | EndTime |
Gets the end time of the search.
|
![]() | ObjectQuery |
Gets the search query in object form.
|
![]() | OccurrenceCount |
Gets the total number of occurrences found.
|
![]() | SearchDuration |
Gets the search duration.
|
![]() | SearchOptions |
Gets the search options.
|
![]() | StartTime |
Gets the start time of the search.
|
![]() | TextQuery |
Gets the search query in text form.
|
Name | Description | |
---|---|---|
![]() | Equals | (Inherited from Object.) |
![]() | Finalize | (Inherited from Object.) |
![]() | GetHashCode | (Inherited from Object.) |
![]() | GetType | (Inherited from Object.) |
![]() | MemberwiseClone | (Inherited from Object.) |
![]() | ToString |
Returns a String that represents the current SearchReport.
(Overrides ObjectToString.) |
string indexFolder = @"c:\MyIndex\"; string documentsFolder = @"c:\MyDocuments\"; // Creating an index in the specified folder Index index = new Index(indexFolder); // Indexing documents from the specified folder index.Add(documentsFolder); // Searching in index SearchResult result1 = index.Search("Einstein"); SearchResult result2 = index.Search("\"Theory of Relativity\""); // Getting search reports SearchReport[] reports = index.GetSearchReports(); // Printing reports to the console foreach (SearchReport report in reports) { Console.WriteLine("Query: " + report.TextQuery); Console.WriteLine("Time: " + report.StartTime); Console.WriteLine("Duration: " + report.SearchDuration); Console.WriteLine("Documents: " + report.DocumentCount); Console.WriteLine("Occurrences: " + report.OccurrenceCount); Console.WriteLine(); }