I am trying to do a search on a scope in SharePoint. I see this error.
My code:
using (SPSite siteCollection = new SPSite("http://sp:25000/"))
{
// create a new FullTextSqlQuery class - use property intializers to set query
FullTextSqlQuery query = new FullTextSqlQuery(siteCollection);
query.QueryText = "SELECT Title" + " from scope() where \"scope\" ='ArticleScope'" + "and Contentclass = 'STS_ListItem_GenericList'";
query.ResultTypes = ResultType.RelevantResults;
query.RowLimit = Int32.MaxValue;
query.TrimDuplicates = true;
query.EnableStemming = false;
query.IgnoreAllNoiseQuery = true;
query.KeywordInclusion = KeywordInclusion.AllKeywords;
query.Timeout = 0x2710;
query.HighlightedSentenceCount = 3;
query.SiteContext = new Uri(siteCollection.Url);
// execute the query and load the results into a datatable
ResultTableCollection queryResults = query.Execute();
ResultTable queryResultsTable = queryResults[ResultType.RelevantResults];
DataTable queryDataTable = new DataTable();
queryDataTable.Load(queryResultsTable, LoadOption.OverwriteChanges);
}