I am trying to sort results by a decimal field, but it doesn't work. I need to use the property name indexer on the standard SearchResultItem
so that it can be dynamic.
return queryable.OrderBy(i => i["price"]);
I have a string & DateTime fields that work fine using:
return queryable.OrderBy(i => i["date"]);
return queryable.OrderBy(i => i["title"]);
Config:
<field fieldName="price"
storageType="YES"
indexType="UNTOKENIZED"
vectorType="NO"
boost="1f"
type="System.Single" settingType="Sitecore.ContentSearch.LuceneProvider.LuceneSearchFieldConfiguration, Sitecore.ContentSearch.LuceneProvider" />`
I have also tried System.Double
, System.Decimal
for the type but still no luck.
Update: field in Luke: