【发布时间】:2017-10-10 22:05:10
【问题描述】:
我遇到了一个场景,我想索引 Blob 存储中存在的所有文件。 但是,如果在 Blob 中上传的文件受密码保护,则索引器会失败,并且索引器现在无法索引剩余的文件。
[
{
"key": null,
"errorMessage": "Error processing blob 'url' with content type ''. Status:422, error: "
}
]
有没有办法忽略受密码保护的文件,或者即使某些文件出现错误也可以继续索引过程。
【问题讨论】:
-
你能分享你的索引器定义吗?
-
` Indexer indexer = new Indexer() { Name = indexerName, DataSourceName = name, TargetIndexName = indexName, Schedule = new IndexingSchedule() { Interval = System.TimeSpan.FromMinutes(Convert.ToDouble(ConfigurationManager. AppSettings["indexrefreshtime"])) } };`
-
indexer.Parameters = new IndexingParameters().ExcludeFileNameExtensions(ConfigurationManager.AppSettings["filetoignore"].Split(',')); indexer.FieldMappings = new List
(); indexer.FieldMappings.Add(new Microsoft.Azure.Search.Models.FieldMapping() { SourceFieldName = "metadata_storage_path", MappingFunction = Microsoft.Azure.Search.Models.FieldMappingFunction.Base64Encode() }); -
请不要将这些包含在 cmets 中。而是编辑您的问题并在其中包含代码。
-
我猜问题是上传的文件受密码保护,因此索引器失败,但它不会继续索引其他文件
标签: azure azure-cognitive-search azure-blob-storage