gpt4 book ai didi

azure - 使用 Azure 认知搜索对静态 HTML Blob 存储内容建立索引未按预期工作

转载 作者:行者123 更新时间:2023-12-03 00:41:40 24 4
gpt4 key购买 nike

我正在致力于在 Blob 存储中对静态 HTML 内容建立索引。该文档指出,预处理分析器在从该数据源索引内容时将去除周围的 HTML 标签。但是,我们的 content 值始终是整个原始 HTML 文档。我也无法提取“元描述”标签的值。根据documentation在索引 Blob 存储上,HTML 内容应自动生成 metadata_description 属性,但该值始终为 null。

我尝试了许多不同的索引器配置,但到目前为止还无法判断我是否配置错误或者 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
}

最佳答案

这可能是由于索引器中的配置造成的 “解析模式”:“文本”

此解析模式用于从文档中提取文字文本值。在本例中,包括所有 html 标签。

将该配置更改为“parsingMode”:“default”以从文档中去除 html 标签。

关于azure - 使用 Azure 认知搜索对静态 HTML Blob 存储内容建立索引未按预期工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59633272/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com