SearchReport Class
Represents a detailed information on a search operation.
Inheritance Hierarchy
SystemObject
  GroupDocs.Search.CommonSearchReport

Namespace: GroupDocs.Search.Common
Assembly: GroupDocs.Search (in GroupDocs.Search.dll) Version: 20.8
Syntax
public class SearchReport

The SearchReport type exposes the following members.

Properties
  NameDescription
Public propertyDocumentCount
Gets the number of documents found.
Public propertyEndTime
Gets the end time of the search.
Public propertyObjectQuery
Gets the search query in object form.
Public propertyOccurrenceCount
Gets the total number of occurrences found.
Public propertySearchDuration
Gets the search duration.
Public propertySearchOptions
Gets the search options.
Public propertyStartTime
Gets the start time of the search.
Public propertyTextQuery
Gets the search query in text form.
Methods
  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString
Returns a String that represents the current SearchReport.
(Overrides ObjectToString.)
Remarks
Learn more
Examples
The example demonstrates a typical usage of the class.
C#
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();
}
See Also