如果缺少属性,则项目不包含在 SharePoint 搜索结果中
我使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否尝试过将“部门”字段包含在“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.