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

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 to as on another forum post but it didnt solve the problem
Who is Participating?
Minesh ShahSharePoint & all about itCommented:
This generally comes if
the metadata property is not mapped in SSP.
map it and run an increamental/full crawl and will work.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.