“该操作被取消”在创建索引器以播种Azure搜索索引时出错

问题描述 投票:0回答:1

我正在使用Azure的SearchServiceClient从我的API创建索引器。我用于此索引器的数据源是一个sql视图,该视图返回200万条记录,并且它是一个运行时间较长的查询。在调用Indexers.CreateOrUpdateAsync创建索引器时,出现此错误-“操作已取消”。

我尝试将30分钟的查询超时添加到索引器定义,但是没有运气。 ({{“ queryTimeout”,“ 00:30:00”}。参考-https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.search.models.indexingparameters.configuration?view=azure-dotnet#Microsoft_Azure_Search_Models_IndexingParameters_Configuration)no

azure azure-search indexer
1个回答
0
投票

您传入的'queryTimeout'参数看起来正确,因此有可能您在SDK的客户端而不是服务中遇到了超时。您应该能够将SearchServiceClient上的“ HttpClient”超时配置为更长。 https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.search.searchserviceclient?view=azure-dotnet

您可能还想考虑减少SQL查询时间以实现最佳索引器性能。

© www.soinside.com 2019 - 2024. All rights reserved.