【问题标题】:Indexing Sharepoint Online Site in Azure search在 Azure 搜索中索引 Sharepoint 在线站点
【发布时间】:2022-01-15 17:33:26
【问题描述】:

我正在尝试为 Sharepoint 网站文档库编制索引,并按照本教程进行操作。

https://docs.microsoft.com/en-us/azure/search/search-howto-index-sharepoint-online

一切正常,我触发了我的技能组并检索了标准 Sharepoint 列。

我的主要问题是我想检索在这个库中创建的自定义列。

例如,我有一个显示为“文档用法”的列,技术名称是“文档用法”,正如我在文档中看到的那样,要获取自定义字段,您需要在 Azure 中创建的数据源的连接字符串中指定它搜索如下:

"container": { "name": "useQuery", "query": "includeLibrariesInSite=https://myorganisation.sharepoint.com/sites/mysite;additionalColumns:DocumentUsage,UploadableDocument,DocumentFormat,Langage,TargetForUse,PaidContent,PublicationDate,Activity,TargetApplication,ProductCategory,SerialNumber,KeyWords"

我在索引器中对字段进行了映射,如下所示:

"fieldMappings": [
    {
      "sourceFieldName": "metadata_spo_site_library_item_id",
      "targetFieldName": "id",
      "mappingFunction": {
        "name": "base64Encode",
        "parameters": null
      }
    },
    {
      "sourceFieldName": "content",
      "targetFieldName": "content",
      "mappingFunction": null
    },
    {
      "sourceFieldName": "DocumentUsage",
      "targetFieldName": "document_usage",
      "mappingFunction": null
    },
    {
      "sourceFieldName": "UploadableDocument",
      "targetFieldName": "uploadable_document",
      "mappingFunction": null
    },
    {
      "sourceFieldName": "DocumentFormat",
      "targetFieldName": "document_format",
      "mappingFunction": null
    },
    {
      "sourceFieldName": "Langage",
      "targetFieldName": "language_sp",
      "mappingFunction": null
    },
    {
      "sourceFieldName": "TargetForUse",
      "targetFieldName": "target_for_use",
      "mappingFunction": null
    },
    {
      "sourceFieldName": "PaidContent",
      "targetFieldName": "paid_content",
      "mappingFunction": null
    },
    {
      "sourceFieldName": "PublicationDate",
      "targetFieldName": "publication_date",
      "mappingFunction": null
    },
    {
      "sourceFieldName": "Activity",
      "targetFieldName": "activity",
      "mappingFunction": null
    },
    {
      "sourceFieldName": "TargetApplication",
      "targetFieldName": "target_application",
      "mappingFunction": null
    },
    {
      "sourceFieldName": "ProductCategory",
      "targetFieldName": "product_category",
      "mappingFunction": null
    },
    {
      "sourceFieldName": "SerialNumber",
      "targetFieldName": "serial_number",
      "mappingFunction": null
    },
    {
      "sourceFieldName": "KeyWords",
      "targetFieldName": "key_words",
      "mappingFunction": null
    }
  ],

除了我的额外共享点自定义列之外,一切正常。 我的问题是检索标准字段,但没有检索数据源查询中指定的自定义字段。

我必须输入列的技术名称或显示名称吗?

检索特殊列有技巧吗? 如您所见,检索的是标准的,而不是文档库中填充的自定义的。

提前感谢您的帮助。

问候

【问题讨论】:

    标签: sharepoint-online azure-cognitive-search


    【解决方案1】:

    您的数据源“容器”=>“查询”字段值中有错字。 'additionalColumns' (additionalColumns:DocumentUsage) 后面有一个冒号,而必须是等号 (=)。

    尝试将 additionalColumns:DocumentUsage 替换为 additionalColumns=DocumentUsage

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-09-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-11-22
      • 1970-01-01
      相关资源
      最近更新 更多