如何执行 MOSS FullTextSqlQuery 并按技能托管属性筛选人员结果?
当我尝试使用 CONTAINS 谓词过滤技能托管属性上的人员结果时,我遇到了 MOSS FulltextSqlQuery 的问题。让我演示一下:
没有过滤器的查询返回预期结果:
SELECT AccountName, Skills
from scope()
where freetext(defaultproperties,'+Bob')
And ("scope" = 'People')
结果
Total Rows: 1
ACCOUNTNAME: MYDOMAIN\Bob
SKILLS: Numchucks | ASP.Net | Application Architecture
但是当我附加 CONTAINS 谓词时,我不再获得预期结果:
SELECT AccountName, Skills
from scope()
where freetext(defaultproperties,'+Bob')
And ("scope" = 'People')
And (CONTAINS(Skills, 'Numchucks'))
结果
Total Rows: 0
我确实意识到我可以使用 SOME ARRAY 谓词来完成此操作,但我想知道为什么这不适用于 Skills 属性的 CONTAINS 谓词。我已成功将 CONTAINS 谓词与指示为“多值”的自定义已爬网属性结合使用。 SSP 管理站点的“已爬网属性”页面上未显示“技能”属性(尽管它似乎是多值的):
http:///ssp/admin/_layouts/schema.aspx?ConsoleView=crawledPropertiesView&category=人们
有什么想法吗?
I am having trouble with a MOSS FulltextSqlQuery when attempting to filter People results on the Skills Managed Property using the CONTAINS predicate. Let me demonstrate:
A query with no filters returns the expected result:
SELECT AccountName, Skills
from scope()
where freetext(defaultproperties,'+Bob')
And ("scope" = 'People')
Result
Total Rows: 1
ACCOUNTNAME: MYDOMAIN\Bob
SKILLS: Numchucks | ASP.Net | Application Architecture
But when I append a CONTAINS predicate, I no longer get the expected result:
SELECT AccountName, Skills
from scope()
where freetext(defaultproperties,'+Bob')
And ("scope" = 'People')
And (CONTAINS(Skills, 'Numchucks'))
Result
Total Rows: 0
I do realize I can accomplish this using the SOME ARRAY predicate, but I would like to know why this is not working with the CONTAINS predicate for the Skills property. I have been successful using the CONTAINS predicate with a custom crawled property that is indicated as 'Multi-valued'. The Skills property (though it seems to be multi-valued) is not indicated as such on the Crawled Properties page in the SSP admin site:
http:///ssp/admin/_layouts/schema.aspx?ConsoleView=crawledPropertiesView&category=People
Anyone have any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
因此,在 Mark Cameron(Microsoft SharePoint 开发人员支持)的帮助下,我发现必须通过将 FullTextQueriable 属性设置为 true,才能使用 ManagedProperty 对象模型 API 启用某些托管属性以进行全文搜索。下面是为我解决这个问题的方法。它可以包含在控制台应用程序中或作为 Farm 或 Web 应用程序范围的功能接收器。
So with the help of Mark Cameron (Microsoft SharePoint Developer Support), I figured out that certain managed properties have to be enabled for full text search using the ManagedProperty object model API by setting the FullTextQueriable property to true. Below is the method that solved this issue for me. It could be included in a Console app or as a Farm or Web Application scoped Feature Receiver.
最后使用*。
您还可以尝试以下几个选项:
源
use the * in the end.
You also have a few more options to try:
Source