public final class IndexBatchException
extends com.azure.core.exception.AzureException
IndexBatchException is thrown whenever Azure Cognitive Search index call was only partially successful.
Users can inspect the indexingResults to determine the operation(s) that have failed.| Constructor and Description |
|---|
IndexBatchException(IndexDocumentsResult result)
Constructs an
IndexBatchException from the given IndexDocumentsResult. |
| Modifier and Type | Method and Description |
|---|---|
IndexBatchBase<SearchDocument> |
findFailedActionsToRetry(IndexBatchBase<SearchDocument> originalBatch,
String keyFieldName)
Finds all index actions in the given batch that failed and need to be retried, and returns them in a new batch.
|
<T> IndexBatchBase<T> |
findFailedActionsToRetry(IndexBatchBase<T> originBatch,
Function<T,String> keySelector)
Finds all index actions in the given batch that failed and need to be retried, and returns them in a new batch.
|
List<IndexingResult> |
getIndexingResults() |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic IndexBatchException(IndexDocumentsResult result)
IndexBatchException from the given IndexDocumentsResult.result - The DocumentIndexResult returned from the service.public IndexBatchBase<SearchDocument> findFailedActionsToRetry(IndexBatchBase<SearchDocument> originalBatch, String keyFieldName)
originalBatch - The batch that partially failed indexing.keyFieldName - The name of the key field from the index schema.public <T> IndexBatchBase<T> findFailedActionsToRetry(IndexBatchBase<T> originBatch, Function<T,String> keySelector)
T - The given document type.originBatch - The batch that partially failed indexing.keySelector - A lambda that retrieves a key value from a given document of type T.public List<IndexingResult> getIndexingResults()
Copyright © 2020 Microsoft Corporation. All rights reserved.