I am trying to setup a search in umbraco examine.I have two search fields ,material and manufacturer.when I trying to search with one material and one manufactuere it will give the correct result.but when try to search more than one material or manufacturer it doesn't give the result.here is my code
const string materialSearchFields = "material";
const string manufacturerSearchFields = "manufacturer";
if (!string.IsNullOrEmpty(Request.QueryString["material"])) { material = Helper.StripTags(Request.QueryString["material"]); } if (!string.IsNullOrEmpty(Request.QueryString["manufacturer"])) { manufacturer = Helper.StripTags(Request.QueryString["manufacturer"]); } if (!string.IsNullOrEmpty(Request.QueryString["material"]) || !string.IsNullOrEmpty(Request.QueryString["manufacturer"])) { var query = userFieldSearchCriteria.Field(materialSearchFields, material).And().Field(manufacturerSearchFields, manufacturer).Compile(); contentResults = contentSearcher.Search(query).ToList(); }
here my search keywors in querystring is material=iron,steel
how can we split this keyword and search done? Thanks in advance for the help....