Indexing reports are created for indexing and updating operations. Indexing reports can be retrieved from the index using the GetIndexingReports method. Reports are stored in the index only while the index is loaded into RAM for use. If you reload the index, the reports will not be restored.
The list of errors of a report contains the errors reported since the previous indexing report: the errors of its operation and the errors reported between the operations, for example while the index was opened. The errors of searches are not listed; they are reported by the ErrorOccurred event and written to the log of the index. A report lists at most 10000 errors; the last line of a longer list gives the number of the other errors. Before, every report listed every error reported since the index was opened, the errors of searches among them.
IndexedDocumentsSize is the total size of the documents that the operation has indexed. Before, it was the size of the last document.
TotalIndexSize does not count the files behind the links to folders inside the folder of the index, such as symbolic links and junctions. A folder is taken for a link by its attributes, so a folder of a synchronized storage that the system marks as a link is not counted either.
The following example demonstrates how to get indexing reports from an index.
C#
stringindexFolder=@"c:\MyIndex\";stringdocumentsFolder1=@"c:\MyDocuments1\";stringdocumentsFolder2=@"c:\MyDocuments2\";// Creating an index in the specified folderIndexindex=newIndex(indexFolder);// Indexing documentsindex.Add(documentsFolder1);index.Add(documentsFolder2);// Getting indexing reportsIndexingReport[]reports=index.GetIndexingReports();// Printing information from reports to the consoleforeach(IndexingReportreportinreports){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("Segments: "+report.SegmentCount);Console.WriteLine("Indexed documents: "+report.IndexedDocuments.Length);foreach(stringerrorinreport.Errors){Console.WriteLine("Error: "+error);}Console.WriteLine();}
More resources
GitHub examples
You may easily run the code from documentation articles and see the features in action in our GitHub examples: