public abstract class IndexingReport extends Object
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();
}
| Constructor and Description |
|---|
IndexingReport() |
| Modifier and Type | Method and Description |
|---|---|
abstract Date |
getEndTime()
Gets the indexing end time.
|
abstract String[] |
getErrors()
Gets the list of errors.
|
abstract String[] |
getIndexedDocuments()
Gets the list of indexed documents.
|
abstract double |
getIndexedDocumentsSize()
Gets the total length of indexed documents in MB.
|
abstract double |
getIndexingTime()
Gets the indexing duration in seconds.
|
abstract String[] |
getRemovedDocuments()
Gets the list of removed from index documents.
|
abstract int |
getSegmentCount()
Gets the number of index segments.
|
abstract Date |
getStartTime()
Gets the indexing start time.
|
abstract int |
getTotalDocumentsInIndex()
Gets the total number of documents in the index.
|
abstract long |
getTotalIndexSize()
Gets the total index size in bytes.
|
abstract int |
getTotalTermCount()
Gets the total number of terms in index.
|
abstract String[] |
getUpdatedDocuments()
Gets the list of updated documents.
|
public abstract Date getEndTime()
public abstract String[] getErrors()
public abstract String[] getIndexedDocuments()
public abstract double getIndexedDocumentsSize()
public abstract double getIndexingTime()
public abstract String[] getRemovedDocuments()
public abstract int getSegmentCount()
public abstract Date getStartTime()
public abstract int getTotalDocumentsInIndex()
public abstract long getTotalIndexSize()
public abstract int getTotalTermCount()
public abstract String[] getUpdatedDocuments()
Copyright © 2026. All rights reserved.