Class BulkIndexResult
java.lang.Object
com.atlassian.jira.search.index.bulk.BulkIndexResult
Result of bulk indexing operations containing success count and failure details
- Since:
- 11.1
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BulkIndexResult.AccumulatorvoidaddFailure(String documentId, Exception exception) Add a failure to index a document, associating the document ID with the exceptionvoidAdd a successful indexing operation, incrementing the success countGet the set of document IDs that failed to be indexedintGet the number of documents that failed to be indexeddoubleGet the percentage of documents that failed to be indexedRetrieve any exceptions that were thrown by the processing threadsintGet the number of documents that were successfully indexedintGet the total number of documents that were processed
-
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
Add a failure to index a document, associating the document ID with the exception- Parameters:
documentId- the document ID which failed to indexexception- the exception to associate with the document ID
-
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
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
-
asyncAccumulator
-