如果缺少属性,则项目不包含在 SharePoint 搜索结果中

发布于 2024-08-22 18:49:43 字数 464 浏览 11 评论 0原文

我使用 MSSQLFT 查询通过 Search.asxm Web 服务轮询 Sharepoint 的搜索。

查询如下:

SELECT PreferredName, Department, AccountName, MobilePhone, WorkPhone
       Title, JobTitle, OfficeNumber
FROM SCOPE()
WHERE 
     "scope"="People" AND JobTitle="Something"
ORDER BY
       Department, OfficeNumber

有些人没有设置 Depmartment 属性,因此不包含在搜索结果中。
如果我从“Order by”子句中删除“Department”部分,则一切正常。有没有办法为这种缺失的财产提供“默认值”,以便这些人仍然被包括在内?

I use an MSSQLFT query to poll Sharepoint's search through Search.asxm web service.

The query goes like this:

SELECT PreferredName, Department, AccountName, MobilePhone, WorkPhone
       Title, JobTitle, OfficeNumber
FROM SCOPE()
WHERE 
     "scope"="People" AND JobTitle="Something"
ORDER BY
       Department, OfficeNumber

Some people do not have Depmartment attribute set and hence are not included in search results.
If I remove the "Department" part from "Order by" clause, everything works fine. Is there a way to provide "default value" for such missing property so that these people would still get included?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

鲜血染红嫁衣 2024-08-29 18:49:43

您是否尝试过将“部门”字段包含在“where.”中?您可能必须破解它才能说出类似 AND (dept = '' 或 dept not null) 的内容。换句话说,任何值都是可接受的。这将使结果中包含行,以便 Order By 子句可以对它们进行操作。

Have you tried including the Department field in the where. You might have to hack it to say something like AND (dept = '' or dept not null). In other words, any value is acceptible. That would get the rows included in the results so the Order By clause could operate on them.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文