Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sharepoint 2007 FullTextSqlQuery中的受众定位_Sharepoint 2007_Full Text Search - Fatal编程技术网

Sharepoint 2007 FullTextSqlQuery中的受众定位

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,

我正在尝试在SharePoint网站中搜索文档,但在将结果显示给用户之前,我需要将受众目标应用于结果

然而,我正在努力检索原始查询中的目标受众设置

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检索原始列表项,然后对列表项应用受众定位测试