I have an issue when trying to search on lower value price range please see code sales works fine its just the lettings properties with lower values dont for some reason?
Any help appreciated thanks
var model = new SearchViewModel
{
SearchTerms = new Dictionary<string, string>(),
Location = "" + Request["Location"],//.ToLower(CultureInfo.InvariantCulture),
MinBedrooms = Convert.ToInt32(Request["MinBedrooms"]),
MinPrice = Convert.ToInt32(Request["MinPrice"]),
MaxPrice = Convert.ToInt32(Request["MaxPrice"]),
}
// Perform the search
var searcher = ExamineManager.Instance.CreateSearchCriteria();
//var searcher = ExamineManager.Instance.SearchProviderCollection["InternalSearcher"];
var query = searcher.NodeTypeAlias("umbPropertyDetails");
if (model.MinPrice >= 0 && model.MaxPrice > 0)
{
if (model.Department == "sales")
{
var paddedLower = model.MinPrice.ToString("D6");
var paddedHigher = model.MaxPrice.ToString("D6");
query.And().Range("price", paddedLower, paddedHigher, true, true);
}
else
{
var higher = model.MaxPrice.ToString();
var lower = model.MinPrice.ToString();
query.And().Range("rent", lower, higher, true, true);
}
}
Price range search not working for low values
I have an issue when trying to search on lower value price range please see code sales works fine its just the lettings properties with lower values dont for some reason?
Any help appreciated thanks
is working on a reply...