【发布时间】:2020-04-25 05:54:55
【问题描述】:
我正在为 blob 存储中的静态 HTML 内容编制索引。该文档指出,在从该数据源索引内容时,预处理分析器将去除周围的 HTML 标记。但是,我们的 content 值始终是整个原始 HTML 文档。我也无法提取我们的“元描述”标签的价值。根据 Indexing Blob Storage 上的documentation,HTML 内容应自动生成metadata_description 属性,但该值始终为空。
我尝试了许多不同的索引器配置,但到目前为止还无法判断我是否有错误配置,或者 Azure 搜索是否无法正确识别内容类型。
blob 存储中的所有文件都有.html 文件扩展名,内容类型 列显示text/html。
这是索引器配置(一些位
{
"@odata.context": "https://<instance>.search.windows.net/$metadata#indexers/$entity",
"@odata.etag": "\"<tag>\"",
"name": "<name>",
"description": null,
"dataSourceName": "<datasource name>",
"skillsetName": null,
"targetIndexName": "<target index>",
"disabled": null,
"schedule": {
"interval": "PT2H",
"startTime": "0001-01-01T00:00:00Z"
},
"parameters": {
"batchSize": null,
"maxFailedItems": -1,
"maxFailedItemsPerBatch": null,
"base64EncodeKeys": null,
"configuration": {
"parsingMode": "text",
"dataToExtract": "contentAndMetadata",
"excludedFileNameExtensions": ".png .jpg .mpg .pdf",
"indexedFileNameExtensions": ".html"
}
},
"fieldMappings": [
{
"sourceFieldName": "metadata_storage_path",
"targetFieldName": "id",
"mappingFunction": {
"name": "base64Encode",
"parameters": null
}
},
{
"sourceFieldName": "metadata_description",
"targetFieldName": "description",
"mappingFunction": null
},
{
"sourceFieldName": "metadata_storage_path",
"targetFieldName": "url",
"mappingFunction": {
"name": "extractTokenAtPosition",
"parameters": {
"delimiter": "<delimiter>",
"position": 1
}
}
}
],
"outputFieldMappings": [],
"cache": null
}
【问题讨论】:
标签: azure search meta azure-cognitive-search