0

我正在使用 sharepoint 对象模型开发一个 sharepoint 站点。我在执行FullTextSqlQuery时收到“搜索请求无法连接到搜索服务”消息。Office Sharepoint Server 搜索和索引服务正在运行。我怎么解决这个问题?

这是代码:

FullTextSqlQuery qry = new FullTextSqlQuery(SPContext.Current.Site);
qry.QueryText = "SELECT  Path, Title, Rank, Description FROM portal..scope()  Where FREETEXT(*,'\"" + keys + "\"') ORDER BY \"Path\" DESC";
qry.EnableStemming = true;
qry.ResultTypes = ResultType.RelevantResults;
qry.KeywordInclusion = KeywordInclusion.AllKeywords;
qry.AuthenticationType = QueryAuthenticationType.NtAuthenticatedQuery;
ResultTableCollection queryResults = qry.Execute();
ResultTable queryResultsTable = queryResults[ResultType.RelevantResults];
DataTable queryDataTable = new DataTable();
queryDataTable.Load(queryResultsTable, LoadOption.OverwriteChanges);
ResultTable queryResultsTable = queryResults[ResultType.RelevantResults];
DataTable queryDataTable = new DataTable();
queryDataTable.Load(queryResultsTable, LoadOption.OverwriteChanges);
4

1 回答 1

0

请参阅以下内容: http:
//urenjoy.blogspot.com/2009/02/error-search-request-was-unable-to.html

于 2010-01-04T11:45:25.703 回答