Class BulkIndexResult

java.lang.Object
com.atlassian.jira.search.index.bulk.BulkIndexResult

public class BulkIndexResult extends Object
Result of bulk indexing operations containing success count and failure details
Since:
11.1
  • Constructor Details

    • BulkIndexResult

      public BulkIndexResult()
    • BulkIndexResult

      public BulkIndexResult(int successCount)
  • Method Details

    • addSuccess

      public void addSuccess()
      Add a successful indexing operation, incrementing the success count
    • addFailure

      public void addFailure(String documentId, Exception exception)
      Add a failure to index a document, associating the document ID with the exception
      Parameters:
      documentId - the document ID which failed to index
      exception - the exception to associate with the document ID
    • getProcessingException

      @Nullable public BulkReindexProcessingException getProcessingException()
      Retrieve any exceptions that were thrown by the processing threads
      Returns:
      a list containing any exceptions that were thrown by the processing threads
    • getSuccessCount

      public int getSuccessCount()
      Get the number of documents that were successfully indexed
      Returns:
      the number of successfully indexed documents
    • getFailedDocumentIds

      public Set<String> getFailedDocumentIds()
      Get the set of document IDs that failed to be indexed
      Returns:
      a set of document IDs that failed to be indexed
    • getFailureCount

      public int getFailureCount()
      Get the number of documents that failed to be indexed
      Returns:
      the number of failed documents
    • getTotalCount

      public int getTotalCount()
      Get the total number of documents that were processed
      Returns:
      the total number of processed documents
    • getFailurePercentage

      public double getFailurePercentage()
      Get the percentage of documents that failed to be indexed
      Returns:
      the percentage of failed documents
    • accumulator

      public static BulkIndexResult.Accumulator accumulator()
    • asyncAccumulator

      public static BulkIndexResult.AsyncAccumulator asyncAccumulator()