带有scoringParameter查询参数的azure搜索请求返回错误
我们在搜索索引中有一个标记字段,如下所示:带有scoringParameter查询参数的azure搜索请求返回错误,azure,search,scoring-profile,Azure,Search,Scoring Profile,我们在搜索索引中有一个标记字段,如下所示: { "name": "tags", "type": "Collection(Edm.String)", "searchable": true, "filterable": true, "retrievable": true, "sortable": false, "facetable":
{
"name": "tags",
"type": "Collection(Edm.String)",
"searchable": true,
"filterable": true,
"retrievable": true,
"sortable": false,
"facetable": true,
"key": false,
"indexAnalyzer": null,
"searchAnalyzer": null,
"analyzer": null,
"synonymMaps": []
}
以及以下标签评分配置文件:
{
"name": "tagBoost",
"functionAggregation": "sum",
"text": null,
"functions": [
{
"fieldName": "tags",
"interpolation": "linear",
"type": "tag",
"boost": 15,
"freshness": null,
"magnitude": null,
"distance": null,
"tag": {
"tagsParameter": "doctype"
}
}
]
}
当请求搜索时,就像,我们得到
有人知道这是为什么,以及如何消除错误吗
我们已经查看了(稀缺的)文档,该请求似乎没有问题,在文档或互联网中也没有发现该错误的痕迹:-/
即使您单独保留
scoringParameter
(…&scoringParameter
),错误也是相同的;只有我们从查询字符串中删除scoringParameter
时,它才会消失。我知道它没有得到很长时间的回答,但供其他人参考。
缺少的部分是添加&scoringProfile=“name”
。对我来说,添加这个很有效
在本例中-
{
"error": {
"code": "",
"message": "Expected 0 parameter(s) but 1 were supplied.\r\nParameter name: scoringParameter"
}
}