I am configuring a custom search for a Sharepoint application, and I am having trouble forming the FullTextSqlQuery query.
My code earns a QueryMalformedException (Your query is malformed. Please rephrase your query.) when I attempt to execute the query.
Here is my code:
search = new FullTextSqlQuery(site); search.QueryText = string.Format("select Title, Path, Description, Rank, Size FROM SCOPE() WHERE \"scope\" = 'Documents' AND CONTAINS (\"{0}\")", EntreeScope.FormProperties["searchBox"]);
where the value of scope.FormProperties["searchBox"] is the query text and site is the current SPSite. Documents is a defined Search Scope on the default Search Service Application on the server.
Thanks in advance,
Brent