IndexingReport

IndexingReport class

Represents a detailed information on an indexing operation.

public class IndexingReport

Properties

Name Description
EndTime { get; } Gets the indexing end time.
Errors { get; } Gets the list of errors.
IndexedDocuments { get; } Gets the list of indexed documents.
IndexedDocumentsSize { get; } Gets the total length of indexed documents in MB.
IndexingTime { get; } Gets the indexing duration.
RemovedDocuments { get; } Gets the list of removed from index documents.
SegmentCount { get; } Gets the number of index segments.
StartTime { get; } Gets the indexing start time.
TotalDocumentsInIndex { get; } Gets the total number of documents in the index.
TotalIndexSize { get; } Gets the total index size in bytes.
TotalTermCount { get; } Gets the total number of terms in index.
UpdatedDocuments { get; } Gets the list of updated documents.

Remarks

Learn more

Examples

The example demonstrates a typical usage of the class.

string indexFolder = @"c:\MyIndex\";
string documentsFolder1 = @"c:\MyDocuments1\";
string documentsFolder2 = @"c:\MyDocuments2\";

// Creating an index in the specified folder
Index index = new Index(indexFolder);

// Indexing documents
index.Add(documentsFolder1);
index.Add(documentsFolder2);

// Getting indexing reports
IndexingReport[] reports = index.GetIndexingReports();

// Printing reports to the console
foreach (IndexingReport report in reports)
{
    Console.WriteLine("Time: " + report.StartTime);
    Console.WriteLine("Duration: " + report.IndexingTime);
    Console.WriteLine("Documents total: " + report.TotalDocumentsInIndex);
    Console.WriteLine("Terms total: " + report.TotalTermCount);
    Console.WriteLine("Indexed documents size (MB): " + report.IndexedDocumentsSize);
    Console.WriteLine("Index size (MB): " + (report.TotalIndexSize / 1024.0 / 1024.0));
    Console.WriteLine();
}

See Also