We help IT Professionals succeed at work.
Get Started

Property doesn't exist or is used in a manner inconsistent with schema settings

Simbios asked
Last Modified: 2012-05-11
I got this error when trying to do the following query,


        public static List<SPListItem> GetListItemsFromFTSQuery()
            string qry = HttpContext.Current.Request.QueryString["k"];
            List<SPListItem> items = new List<SPListItem>();
            DataTable retResults = new DataTable();

            using (SPSite site = SPContext.Current.Site)
                FullTextSqlQuery fts = new FullTextSqlQuery(site);
                fts.QueryText = "SELECT owsItemURL,Title,FileExtension,ContentType,Created,LastModifiedTime,Path FROM SCOPE() " +
                  "WHERE (CONTAINS(Path,'\"/Lists/ \"')) "+
                  "and (CONTAINS(Title," + qry + "))  ";
                fts.ResultTypes = ResultType.RelevantResults;
                fts.RowLimit = 300;

                ResultTableCollection rtc = fts.Execute();
                if (rtc.Count > 0)

                    using (ResultTable relevantResults = rtc[ResultType.RelevantResults])
                        retResults.Load(relevantResults, LoadOption.OverwriteChanges);

                    foreach (DataRow row in retResults.Rows)
                        if (row["ContentType"].ToString() == "Item")
                            using (SPSite lookupSite = new SPSite(row["owsItemUrl"].ToString()))
                                using (SPWeb web = lookupSite.OpenWeb())
                                    SPFile file = web.GetFile(row["owsItemUrl"].ToString());
                return items;

already tried changing the assembly form sharepoint.search to office.server.search as on another forum post but it didnt solve the problem
Watch Question
SharePoint & all about it
This problem has been solved!
Unlock 1 Answer and 1 Comment.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE