IndexingReport
Leave feedback
On this page
Inheritance: java.lang.Object
public abstract class IndexingReport
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();
}
```
| Constructor | Description |
|---|---|
| IndexingReport() |
| Method | Description |
|---|---|
| getTotalDocumentsInIndex() | Gets the total number of documents in the index. |
| getTotalTermCount() | Gets the total number of terms in index. |
| getIndexedDocumentsSize() | Gets the total length of indexed documents in MB. |
| getSegmentCount() | Gets the number of index segments. |
| getTotalIndexSize() | Gets the total index size in bytes. |
| getStartTime() | Gets the indexing start time. |
| getEndTime() | Gets the indexing end time. |
| getIndexingTime() | Gets the indexing duration in seconds. |
| getErrors() | Gets the list of errors. |
| getIndexedDocuments() | Gets the list of indexed documents. |
| getUpdatedDocuments() | Gets the list of updated documents. |
| getRemovedDocuments() | Gets the list of removed from index documents. |
public IndexingReport()
public abstract int getTotalDocumentsInIndex()
Gets the total number of documents in the index.
Returns: int - The total number of documents in the index.
public abstract int getTotalTermCount()
Gets the total number of terms in index.
Returns: int - The total number of terms in index.
public abstract double getIndexedDocumentsSize()
Gets the total length of indexed documents in MB.
Returns: double - The total length of indexed documents in MB.
public abstract int getSegmentCount()
Gets the number of index segments.
Returns: int - The number of index segments.
public abstract long getTotalIndexSize()
Gets the total index size in bytes.
Returns: long - The total index size in bytes.
public abstract Date getStartTime()
Gets the indexing start time.
Returns: java.util.Date - The indexing start time.
public abstract Date getEndTime()
Gets the indexing end time.
Returns: java.util.Date - The indexing end time.
public abstract double getIndexingTime()
Gets the indexing duration in seconds.
Returns: double - The indexing duration in seconds.
public abstract String[] getErrors()
Gets the list of errors.
Returns: java.lang.String[] - The list of errors.
public abstract String[] getIndexedDocuments()
Gets the list of indexed documents.
Returns: java.lang.String[] - The list of indexed documents.
public abstract String[] getUpdatedDocuments()
Gets the list of updated documents.
Returns: java.lang.String[] - The list of updated documents.
public abstract String[] getRemovedDocuments()
Gets the list of removed from index documents.
Returns: java.lang.String[] - The list of removed from index documents.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.