Managed property

Oct 29, 2009 at 9:11 PM

HI

I changed the code and its working for managed properties also now here is a code ...

if (keywordQuery.Contains(":"))
            {
                key = keywordQuery.Substring(0, keywordQuery.IndexOf(":"));
                key = key.Substring(0, key.LastIndexOf(" "));
                

                //RefineSearch()
            }
            else
            {
                key = keywordQuery;
            }

if (keywordQuery.Contains(":"))
            {
                string[] properties;
                string property;
                property = keywordQuery.Substring(key.Length+1);
                property = property.Replace("\" ", "~");
                properties = property.Split('~');

                foreach (string prop in properties)
                {
                    string propName = prop.Substring(0, prop.IndexOf(":"));
                    string propval = prop.Substring(prop.IndexOf(":") + 1);
                    propval=propval.Replace("\"", "");
                    fullTextQuery.AppendFormat(" AND \"{0}\"='{1}'", propName, propval);
                }

                //RefineSearch()
            }

 

 

Hope it will help you guys please let me know if you need any help

bharat.chopra@hotmail.com

Thanks

Bharat