Microsoft.Azure.Search.IndexBatchException:批处理中的1000个索引操作中的1个失败

时间:2017-05-25 05:20:13

标签: azure azure-search azure-data-factory

在将数据从Azure Search Index数据库推送到OnPremSqlADF时,我遇到以下错误。

 Copy activity encountered a user error at Sink side: ErrorCode=UserErrorAzuerSearchOperation,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Error happened when writing data to Azure Search Index 'coursemap'.,Source=Microsoft.DataTransfer.ClientLibrary.AzureSearch,''Type=Microsoft.Azure.Search.IndexBatchException,Message=1 of 1000 indexing actions in the batch failed. The remaining actions succeeded and modified the index. Check the IndexResponse property for the status of each index action.,Source=Microsoft.Azure.Search,'.

知道如何解决此问题吗?

1 个答案:

答案 0 :(得分:1)

您似乎正在使用数据管理网关的旧版本2.8,该版本未显示IndexBatchException的所有可用详细信息。考虑更新到最新的version 2.9。使用该版本,您将能够查看批次中每个失败文档的项目级错误。

在这种情况下,我们已经查看了您的服务的遥测,错误是冲突(409)错误,如下所示:

Error indexing document with key '100665_1458': status 409
Error indexing document with key '100666_1255': status 409
Error indexing document with key '100665_1280': status 409 
Error indexing document with key '100669_1280': status 409
Error indexing document with key '100670_1280': status 409
Error indexing document with key '100670_1280': status 409

看起来您在一个批处理中有多个具有相同文档密钥的文档,并且/或者您有多个复制活动同时将具有相同文档密钥的数据索引到同一索引中,这会产生这些冲突。

此外,网关版本2.9具有更好的重试策略,可以减少这些冲突错误的发生。