1

我们正在尝试使用 Azure 认知搜索来启用对存储在 Azure Blob 存储中的文档的全文搜索。我们需要的功能之一是显示特定文档的热门亮点。

我们注意到,虽然对精确短语的搜索仅正确匹配包含该精确短语的那些文档,但会为短语中的单个单词返回突出显示,而不是完整短语。

例子

对于短语搜索“供应协议”,我们会得到“供应”和“协议”的亮点。

要求:

{
    "search": "\"supply agreement\"",
    "select": "metadata_storage_name,metadata_storage_path,language",
    "searchFields": "merged_content",
    "highlight": "merged_content"
}

回复:

{
    "@odata.context": "https://....search.windows.net/indexes('...')/$metadata#docs(*)",
    "value": [
        {
            "@search.score": 0.047654618,
            "@search.highlights": {
                "merged_content": [
                    "Customer has agreed to engage Supplier to <em>supply</em> the Products and Supplier has agreed to accept the engagement on the terms set out in this <em>Agreement</em>.",
                    "<em>Agreement</em>\n1.",
                    "Tax means goods and services, value added or similar consumption based tax applicable to the <em>supply</em> of the Products under this <em>agreement</em>.",
                    ...
                ]
            },
            "metadata_storage_name": "a2b23e30-c1e0-4c52-a659-d8705662d699.docx",
            "metadata_storage_path": "...",
            "language": "en"
        },
        ...
    ]
}

这是当前版本的 Azure 认知搜索 API 的已知问题吗?

4

1 回答 1

2

目前没有办法突出整个短语,但我有个好消息要告诉你。突出短语的工作是我们正在跟踪并计划发布的工作,尽管我还没有具体的日期来宣布。

Luis Cabrera - 首席项目经理 - Azure 认知搜索

于 2020-03-24T17:35:29.797 回答