views:

1383

answers:

1

Hi,

I am developing a sharepoint site using sharepoint object model. I am getting "The search request was unable to connect to the Search Service" message on execute FullTextSqlQuery. Office Sharepoint Server Search and Indexing Service are running. How can I solve this problem?

Here is code:

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);
A: 

See following:
http://urenjoy.blogspot.com/2009/02/error-search-request-was-unable-to.html

Brij
Thank you so much! After reading this post, it worked!
mrt