gpt4 book ai didi

带有评分参数查询参数的 azure 搜索请求返回错误

转载 作者:行者123 更新时间:2023-12-03 01:03:21 26 4
gpt4 key购买 nike

我们在搜索索引中有一个标签字段,如下所示:

{
"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"
}
}
]
}

当请求搜索时,就像https://my-beautiful-products-index.search.windows.net/indexes/products/docs?api-version=2017-11-11&search=karin&scoringParameter=doctype-serial一样,我们得到

{
"error": {
"code": "",
"message": "Expected 0 parameter(s) but 1 were supplied.\r\nParameter name: scoringParameter"
}
}

有人知道为什么是这样以及如何消除错误吗?

我们已经浏览了(稀缺的)文档,该请求似乎没问题,并且在文档或 Internet 中都没有发现该错误的痕迹:-/。

即使您单独保留 scoringParameter (...&scoringParameter),错误也是一样的;只有当我们从查询字符串中删除 scoringParameter 时,它才会消失。

最佳答案

我知道这个问题很久没有得到回答,但供其他人引用。缺少的部分是添加 &scoringProfile="name"。对我来说添加这个是有效的。

在这种情况下-https://my-beautiful-products-index.search.windows.net/indexes/products/docs?api-version=2017-11-11&search=karin&scoringProfile=tagBoost&scoringParameter=doctype-serial ,

关于带有评分参数查询参数的 azure 搜索请求返回错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55688030/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com