我正在使用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);
答案 0 :(得分:0)