我能够根据日期过滤文档,但我真正需要的是提高某些日期范围。以下查询返回结果。
{
"queryType":"full",
"search": "(priority:High^50 || Normal^10) AND (type:one^1 || two^10)",
"filter": "(type eq 'one' or type eq 'two') and publishedDate eq 2018-04-01",
"searchMode": "all"
}
但我真的不想过滤这些,我想增加某些日期。我真正想要的是这样的:
{
"queryType":"full",
"search": "(priority:High^50 || Normal^10) AND (type:one^1 || two^10) AND publishedDate:2018-04-01^100",
"filter": "(type eq 'one' or type eq 'two')",
"searchMode": "all"
}
我收到错误:
{
“错误”:
{“代码”: ””,
"message": "查询请求中的参数非法:publishedDate 不是可搜索字段。"
}
}
请查看 Azure 搜索中的评分配置文件。https://learn.microsoft.com/en-us/rest/api/searchservice/add-scoring-profiles-to-a-search-index https://learn.microsoft.com/en-us/rest/api/searchservice/add-scoring-profiles-to-a-search-index。您可以在日期时间字段上指定新鲜度函数,并给出日期范围以增强匹配。
Nate
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)