Sharepoint 2007 FullTextSqlQuery中的受众定位
我正在尝试在SharePoint网站中搜索文档,但在将结果显示给用户之前,我需要将受众目标应用于结果 然而,我正在努力检索原始查询中的目标受众设置Sharepoint 2007 FullTextSqlQuery中的受众定位,sharepoint-2007,full-text-search,Sharepoint 2007,Full Text Search,我正在尝试在SharePoint网站中搜索文档,但在将结果显示给用户之前,我需要将受众目标应用于结果 然而,我正在努力检索原始查询中的目标受众设置 using (SPSite site = new SPSite(SPContext.Current.Site.ID)) { using (FullTextSqlQuery fullText = new FullTextSqlQuery(site)) { fullText.QueryText = @"select Title,
using (SPSite site = new SPSite(SPContext.Current.Site.ID)) {
using (FullTextSqlQuery fullText = new FullTextSqlQuery(site)) {
fullText.QueryText = @"select Title, Path, Description, TargetAudience from scope() where ((""scope"" = 'All Sites'))"
+ @" and IsDocument = 1 and freetext(*, '{0}')";
fullText.QueryText = string.Format(fullText.QueryText, this.documentFilter.AllOfTheseWords);
fullText.ResultTypes = ResultType.RelevantResults;
ResultTableCollection resultTableCollection = fullText.Execute();
allofTheseWords = new DataTable();
if (resultTableCollection.Exists(ResultType.RelevantResults)) {
allofTheseWords.Load(resultTableCollection[ResultType.RelevantResults], LoadOption.OverwriteChanges);
}
}
}
或者b从原始查询中检索列表项id guid,这样我就可以将每个结果绑定到原始列表项,从而使用列表项应用受众目标
有什么建议吗?我最终找到了一种方法,根据全文查询返回的URL检索原始列表项,然后对列表项应用受众定位测试