com.groupdocs.search.common

Class IndexingReport



  • 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();
     }
     
    • Constructor Detail

      • IndexingReport

        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)
    • Method Detail

      • create

        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)
      • getTotalDocumentsInIndex

        public final int getTotalDocumentsInIndex()

        Gets the total number of documents in the index.

        Returns:
        The total number of documents in the index.
      • getTotalTermCount

        public final int getTotalTermCount()

        Gets the total number of terms in index.

        Returns:
        The total number of terms in index.
      • getIndexedDocumentsSize

        public final double getIndexedDocumentsSize()

        Gets the total length of indexed documents in MB.

        Returns:
        The total length of indexed documents in MB.
      • getSegmentCount

        public final int getSegmentCount()

        Gets the number of index segments.

        Returns:
        The number of index segments.
      • getTotalIndexSize

        public final long getTotalIndexSize()

        Gets the total index size in bytes.

        Returns:
        The total index size in bytes.
      • getStartTime

        public final Date getStartTime()

        Gets the indexing start time.

        Returns:
        The indexing start time.
      • getEndTime

        public final Date getEndTime()

        Gets the indexing end time.

        Returns:
        The indexing end time.
      • getIndexingTime

        public final double getIndexingTime()

        Gets the indexing duration in seconds.

        Returns:
        The indexing duration in seconds.
      • getErrors

        public final String[] getErrors()

        Gets the list of errors.

        Returns:
        The list of errors.
      • getIndexedDocuments

        public final String[] getIndexedDocuments()

        Gets the list of indexed documents.

        Returns:
        The list of indexed documents.
      • getUpdatedDocuments

        public final String[] getUpdatedDocuments()

        Gets the list of updated documents.

        Returns:
        The list of updated documents.
      • getRemovedDocuments

        public final String[] getRemovedDocuments()

        Gets the list of removed from index documents.

        Returns:
        The list of removed from index documents.