0

在 Azure 搜索中,我可以搜索特定字段吗

示例:我有以下“研究”索引。

{
  "Error": null,
  "IsSuccess": true,
  "StatusCode": 201,
  "Body": {
    "name": "Research",
    "fields": [
      {
        "name": "Id",
        "type": "Edm.String",
        "searchable": false,
        "filterable": false,
        "sortable": false,
        "facetable": false,
        "suggestions": false,
        "key": true,
        "retrievable": true
      },
      {
        "name": "Title",
        "type": "Edm.String",
        "searchable": true,
        "filterable": false,
        "sortable": false,
        "facetable": false,
        "suggestions": true,
        "key": false,
        "retrievable": true
      },
      {
        "name": "Description",
        "type": "Edm.String",
        "searchable": true,
        "filterable": false,
        "sortable": false,
        "facetable": false,
        "suggestions": true,
        "key": false,
        "retrievable": true
      },
      {
        "name": "Questions",
        "type": "Collection(Edm.String)",
        "searchable": true,
        "filterable": false,
        "sortable": false,
        "facetable": false,
        "suggestions": true,
        "key": false,
        "retrievable": true
      },
    ],
    "scoringProfiles": [],
    "defaultScoringProfile": null,
    "corsOptions": null
  }
} 

现在在搜索查询中,我可以要求 Azure 仅在“问题”字段中进行搜索吗?

例如,当用户搜索“物联网如何使汽车行业受益?”时 并选择我想在“问题”中找到这个我能做到吗。

4

1 回答 1

3

是的,这可以使用searchFields=[string]参数。例如,在您的情况下,您将添加&searchFields=Questions到您的 URL 搜索请求。您可以在此处了解更多信息:https ://msdn.microsoft.com/en-us/library/azure/dn798927.aspx

于 2015-02-10T20:43:44.707 回答