public class IndexingReport extends Object
Represents a detailed information on an indexing operation.
Learn more
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
for (IndexingReport report : reports)
{
DateFormat df = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");
System.out.println("Time: " + df.format(report.getStartTime()));
System.out.println("Duration: " + report.getIndexingTime());
System.out.println("Documents total: " + report.getTotalDocumentsInIndex());
System.out.println("Terms total: " + report.getTotalTermCount());
System.out.println("Indexed documents size (MB): " + report.getIndexedDocumentsSize());
System.out.println("Index size (MB): " + (report.getTotalIndexSize() / 1024.0 / 1024.0));
System.out.println();
}
Modifier | Constructor and Description |
---|---|
protected |
IndexingReport(int totalDocumentsInIndex,
int totalTermCount,
double indexedDocumentsSize,
int segmentCount,
long totalIndexSize,
com.aspose.ms.System.DateTime startTime,
com.aspose.ms.System.DateTime endTime,
String[] errors,
String[] indexedDocuments,
String[] updatedDocuments,
String[] removedDocuments) |
Modifier and Type | Method and Description |
---|---|
protected static IndexingReport |
create(int totalDocumentsInIndex,
int totalTermCount,
double indexedDocumentsSize,
int segmentCount,
long totalIndexSize,
com.aspose.ms.System.DateTime startTime,
com.aspose.ms.System.DateTime endTime,
String[] errors,
String[] indexedDocuments,
String[] updatedDocuments,
String[] removedDocuments) |
Date |
getEndTime()
Gets the indexing end time.
|
String[] |
getErrors()
Gets the list of errors.
|
String[] |
getIndexedDocuments()
Gets the list of indexed documents.
|
double |
getIndexedDocumentsSize()
Gets the total length of indexed documents in MB.
|
double |
getIndexingTime()
Gets the indexing duration in seconds.
|
String[] |
getRemovedDocuments()
Gets the list of removed from index documents.
|
int |
getSegmentCount()
Gets the number of index segments.
|
Date |
getStartTime()
Gets the indexing start time.
|
int |
getTotalDocumentsInIndex()
Gets the total number of documents in the index.
|
long |
getTotalIndexSize()
Gets the total index size in bytes.
|
int |
getTotalTermCount()
Gets the total number of terms in index.
|
String[] |
getUpdatedDocuments()
Gets the list of updated documents.
|
protected IndexingReport(int totalDocumentsInIndex, int totalTermCount, double indexedDocumentsSize, int segmentCount, long totalIndexSize, com.aspose.ms.System.DateTime startTime, com.aspose.ms.System.DateTime endTime, String[] errors, String[] indexedDocuments, String[] updatedDocuments, String[] removedDocuments)
protected static IndexingReport create(int totalDocumentsInIndex, int totalTermCount, double indexedDocumentsSize, int segmentCount, long totalIndexSize, com.aspose.ms.System.DateTime startTime, com.aspose.ms.System.DateTime endTime, String[] errors, String[] indexedDocuments, String[] updatedDocuments, String[] removedDocuments)
public final int getTotalDocumentsInIndex()
Gets the total number of documents in the index.
public final int getTotalTermCount()
Gets the total number of terms in index.
public final double getIndexedDocumentsSize()
Gets the total length of indexed documents in MB.
public final int getSegmentCount()
Gets the number of index segments.
public final long getTotalIndexSize()
Gets the total index size in bytes.
public final Date getStartTime()
Gets the indexing start time.
public final Date getEndTime()
Gets the indexing end time.
public final double getIndexingTime()
Gets the indexing duration in seconds.
public final String[] getErrors()
Gets the list of errors.
public final String[] getIndexedDocuments()
Gets the list of indexed documents.
public final String[] getUpdatedDocuments()
Gets the list of updated documents.
public final String[] getRemovedDocuments()
Gets the list of removed from index documents.