【问题标题】:Azure Cognitive Search: Field MappingsAzure 认知搜索:字段映射
【发布时间】:2022-11-03 05:26:05
【问题描述】:

我想在认知搜索中建立一个字段映射。我正在使用基于 Web 的 UI 和导入数据向导来创建索引和索引器。

在使用向导创建索引和索引器后,我尝试将一个组件添加到索引器的 JSON 中,例如

"fieldMappings": [
    {
      "sourceFieldName": "metadata_storage_name",
      "targetFieldName": "new_storage_name"
    }
 ]

然后我运行索引器,它是成功的,但是当使用搜索资源管理器时,字段“new_storage_name”对于所有结果都是空的。

我真的很想添加一个新字段来获取未编码的“metadata_storage_path”并遇到一些问题,但是由于我也停留在这个非常基本的步骤上,所以我想我会先尝试回答。

工作流程中有什么我弄错了吗?我发现 MS 文档不太有用。

【问题讨论】:

    标签: azure azure-cognitive-search


    【解决方案1】:

    您需要使用 base64Decode 函数。

    "fieldMappings" : [
      {
        "sourceFieldName": "metadata_storage_name",
        "targetFieldName": "new_storage_name"
        "mappingFunction" : { 
          "name" : "base64Decode", 
          "parameters" : { "useHttpServerUtilityUrlTokenDecode" : false }
        }
      }]
    

    阅读更多: https://learn.microsoft.com/en-us/azure/search/search-indexer-field-mappings?WT.mc_id=Portal-Microsoft_Azure_Search&tabs=rest#mappingFunctions

    【讨论】:

      猜你喜欢
      • 2019-02-05
      • 2019-12-08
      • 2021-10-18
      • 1970-01-01
      • 2021-11-26
      • 2021-10-13
      • 2020-03-27
      • 2017-05-25
      • 2021-06-06
      相关资源
      最近更新 更多